StorageFileQueryResult.GetFilesAsync Method

Definition

Overloads

GetFilesAsync()

Retrieves a list of all the files in the query result set.

GetFilesAsync(UInt32, UInt32)

Retrieves a list of files in a specified range.

GetFilesAsync()

Retrieves a list of all the files in the query result set.

public:
 virtual IAsyncOperation<IVectorView<StorageFile ^> ^> ^ GetFilesAsync() = GetFilesAsync;
/// [Windows.Foundation.Metadata.Overload("GetFilesAsyncDefaultStartAndCount")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFile>> GetFilesAsync();
[Windows.Foundation.Metadata.Overload("GetFilesAsyncDefaultStartAndCount")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFile>> GetFilesAsync();
function getFilesAsync()
Public Function GetFilesAsync () As IAsyncOperation(Of IReadOnlyList(Of StorageFile))

Returns

IAsyncOperation<IReadOnlyList<StorageFile>>

When this method completes successfully, it returns a list (type IVectorView ) of files that are represented by storageFile objects.

Attributes

See also

Applies to

GetFilesAsync(UInt32, UInt32)

Retrieves a list of files in a specified range.

public:
 virtual IAsyncOperation<IVectorView<StorageFile ^> ^> ^ GetFilesAsync(unsigned int startIndex, unsigned int maxNumberOfItems) = GetFilesAsync;
/// [Windows.Foundation.Metadata.Overload("GetFilesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFile>> GetFilesAsync(uint32_t startIndex, uint32_t maxNumberOfItems);
[Windows.Foundation.Metadata.Overload("GetFilesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFile>> GetFilesAsync(uint startIndex, uint maxNumberOfItems);
function getFilesAsync(startIndex, maxNumberOfItems)
Public Function GetFilesAsync (startIndex As UInteger, maxNumberOfItems As UInteger) As IAsyncOperation(Of IReadOnlyList(Of StorageFile))

Parameters

startIndex
UInt32

The zero-based index of the first file to retrieve. This parameter is 0 by default.

maxNumberOfItems
UInt32

The maximum number of files to retrieve. Use -1 to retrieve all files. If the range contains fewer files than the max number, all files in the range are returned.

Returns

IAsyncOperation<IReadOnlyList<StorageFile>>

When this method completes successfully, it returns a list (type IVectorView ) of files that are represented by storageFile objects.

Attributes

Remarks

Use this overload to improve system performance by presenting a virtualized view of the query results that includes only the necessary subset of files. For example, if your app displays many files in a gallery you could use this range to retrieve only the files that are currently visible to the user.

See also

Applies to