IStorageFolderQueryOperations.GetFilesAsync Method

Definition

Overloads

GetFilesAsync(CommonFileQuery)

Retrieves a list of files based on the specified query (shallow enumeration). This returns a snapshot of the files at a point in time and does not allow you to keep track of changes through events.

GetFilesAsync(CommonFileQuery, UInt32, UInt32)

Retrieves a list of files in a specified range that are based on the specified file query. This returns a snapshot of the files at a point in time and does not allow you to keep track of changes through events.

GetFilesAsync(CommonFileQuery)

Retrieves a list of files based on the specified query (shallow enumeration). This returns a snapshot of the files at a point in time and does not allow you to keep track of changes through events.

public:
 IAsyncOperation<IVectorView<StorageFile ^> ^> ^ GetFilesAsync(CommonFileQuery query);
/// [Windows.Foundation.Metadata.Overload("GetFilesAsyncOverloadDefaultStartAndCount")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFile>> GetFilesAsync(CommonFileQuery const& query);
[Windows.Foundation.Metadata.Overload("GetFilesAsyncOverloadDefaultStartAndCount")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFile>> GetFilesAsync(CommonFileQuery query);
function getFilesAsync(query)
Public Function GetFilesAsync (query As CommonFileQuery) As IAsyncOperation(Of IReadOnlyList(Of StorageFile))

Parameters

query
CommonFileQuery

The type of file query to perform.

Returns

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(CommonFileQuery, UInt32, UInt32)

Retrieves a list of files in a specified range that are based on the specified file query. This returns a snapshot of the files at a point in time and does not allow you to keep track of changes through events.

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

Parameters

query
CommonFileQuery

The type of file query to perform.

startIndex
UInt32

unsigned int

uint32_t

The zero-based index of the first file in the range. This parameter defaults to 0.

maxItemsToRetrieve
UInt32

unsigned int

uint32_t

The maximum number of files to retrieve. Use -1 to retrieve all files.

Returns

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 retrieve improve system performance by presenting a virtual view of the query results that includes only the necessary subset of files.

See also

Applies to