IStorageFolderQueryOperations.GetItemsAsync(UInt32, UInt32) 方法

定義

擷取指定範圍中的檔案、資料夾或檔案群組等清單專案, (淺層列舉) 。

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

參數

startIndex
UInt32

unsigned int

uint32_t

範圍中第一個專案之以零起始的索引。 這個參數的預設值是 0。

maxItemsToRetrieve
UInt32

unsigned int

uint32_t

要擷取的專案數目上限。 使用 -1 來擷取所有專案。

傳回

當此方法順利完成時,它會傳回專案類型 IVectorView) (清單。 每個專案都是 IStorageItem 類型,代表檔案、資料夾或檔案群組。

在此清單中,檔案會以 StorageFile 物件表示,而資料夾或檔案群組則以 StorageFolder 物件表示。

屬性

適用於

另請參閱