IStorageFolderQueryOperations.GetFoldersAsync Method

Definition

Overloads

GetFoldersAsync(CommonFolderQuery)

Retrieves a list of folders and file groups based on a specified folder query. This returns a snapshot of the folders or file groups at a point in time and does not allow you to keep track of changes through events.

GetFoldersAsync(CommonFolderQuery, UInt32, UInt32)

Asynchronously retrieves a range of folders in this folder based on a folder query. This returns a snapshot of the folders or file groups at a point in time and does not allow you to keep track of changes through events.

GetFoldersAsync(CommonFolderQuery)

Retrieves a list of folders and file groups based on a specified folder query. This returns a snapshot of the folders or file groups at a point in time and does not allow you to keep track of changes through events.

public:
 IAsyncOperation<IVectorView<StorageFolder ^> ^> ^ GetFoldersAsync(CommonFolderQuery query);
/// [Windows.Foundation.Metadata.Overload("GetFoldersAsyncOverloadDefaultStartAndCount")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFolder>> GetFoldersAsync(CommonFolderQuery const& query);
[Windows.Foundation.Metadata.Overload("GetFoldersAsyncOverloadDefaultStartAndCount")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFolder>> GetFoldersAsync(CommonFolderQuery query);
function getFoldersAsync(query)
Public Function GetFoldersAsync (query As CommonFolderQuery) As IAsyncOperation(Of IReadOnlyList(Of StorageFolder))

Parameters

query
CommonFolderQuery

The type of folder query to perform.

Returns

When this method completes successfully, it returns a list (type IVectorView) of folders of file groups that are represented by StorageFolder objects.

Attributes

See also

Applies to

GetFoldersAsync(CommonFolderQuery, UInt32, UInt32)

Asynchronously retrieves a range of folders in this folder based on a folder query. This returns a snapshot of the folders or file groups at a point in time and does not allow you to keep track of changes through events.

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

Parameters

query
CommonFolderQuery

The type of folder query to perform.

startIndex
UInt32

unsigned int

uint32_t

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

maxItemsToRetrieve
UInt32

unsigned int

uint32_t

The maximum number of folders or file groups to retrieve. Use -1 to retrieve all folders or file groups.

Returns

When this method completes successfully, it returns a list (type IVectorView) of folders of file groups that are represented by StorageFolder 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 folders.

See also

Applies to