StorageFolderQueryResult.GetFoldersAsync Method

Definition

Overloads

GetFoldersAsync()

Retrieves a list of all the folders (or file groups) in the result set.

GetFoldersAsync(UInt32, UInt32)

Retrieves folders (or file groups) in a specified range.

GetFoldersAsync()

Retrieves a list of all the folders (or file groups) in the result set.

public:
 virtual IAsyncOperation<IVectorView<StorageFolder ^> ^> ^ GetFoldersAsync() = GetFoldersAsync;
/// [Windows.Foundation.Metadata.Overload("GetFoldersAsyncDefaultStartAndCount")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFolder>> GetFoldersAsync();
[Windows.Foundation.Metadata.Overload("GetFoldersAsyncDefaultStartAndCount")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFolder>> GetFoldersAsync();
function getFoldersAsync()
Public Function GetFoldersAsync () As IAsyncOperation(Of IReadOnlyList(Of StorageFolder))

Returns

When this method completes successfully, it returns a list (type IVectorView) of folders or file groups that are represented by StorageFolder objects. Each of these folder or file group can also be enumerated to retrieve its contents.

Attributes

See also

Applies to

GetFoldersAsync(UInt32, UInt32)

Retrieves folders (or file groups) in a specified range.

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

Parameters

startIndex
UInt32

unsigned int

uint32_t

The zero-based index of the first folder to retrieve. This parameter defaults to 0.

maxNumberOfItems
UInt32

unsigned int

uint32_t

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

Returns

When this method completes successfully, it returns a list (type IVectorView) of folders or file groups that are represented by StorageFolder 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 folders. For example, if your app displays many folders in a gallery you could use this range to retrieve only the folders that are currently visible to the user.

See also

Applies to