Share via


IStorageFolderQueryOperations.GetFoldersAsync 方法

定義

多載

GetFoldersAsync(CommonFolderQuery)

根據指定的資料夾查詢,擷取資料夾和檔案群組的清單。 這會在某個時間點傳回資料夾或檔案群組的快照集,且不允許您透過事件來追蹤變更。

GetFoldersAsync(CommonFolderQuery, UInt32, UInt32)

根據資料夾查詢,以非同步方式擷取此資料夾中的資料夾範圍。 這會在某個時間點傳回資料夾或檔案群組的快照集,且不允許您透過事件來追蹤變更。

GetFoldersAsync(CommonFolderQuery)

根據指定的資料夾查詢,擷取資料夾和檔案群組的清單。 這會在某個時間點傳回資料夾或檔案群組的快照集,且不允許您透過事件來追蹤變更。

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))

參數

query
CommonFolderQuery

要執行的資料夾查詢類型。

傳回

當此方法成功完成時,它會傳回清單 (類型 IVectorView) StorageFolder 物件所代表之檔案群組的資料夾。

屬性

另請參閱

適用於

GetFoldersAsync(CommonFolderQuery, UInt32, UInt32)

根據資料夾查詢,以非同步方式擷取此資料夾中的資料夾範圍。 這會在某個時間點傳回資料夾或檔案群組的快照集,且不允許您透過事件來追蹤變更。

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))

參數

query
CommonFolderQuery

要執行的資料夾查詢類型。

startIndex
UInt32

unsigned int

uint32_t

範圍中第一個資料夾或檔案群組之以零起始的索引。 這個參數的預設值是 0。

maxItemsToRetrieve
UInt32

unsigned int

uint32_t

要擷取的資料夾或檔案群組數目上限。 使用 -1 擷取所有資料夾或檔案群組。

傳回

當此方法成功完成時,它會傳回清單 (類型 IVectorView) StorageFolder 物件所代表之檔案群組的資料夾。

屬性

備註

使用此多載來藉由呈現只包含必要資料夾子集的查詢結果虛擬檢視,來擷取改善系統效能。

另請參閱

適用於