Windows Dev Center

IStorageFolderQueryOperations.GetFoldersAsync(CommonFolderQuery, UInt32, UInt32) method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

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.

Syntax


Function GetFoldersAsync(
  query As CommonFolderQuery,  
  startIndex As UInteger,  
  maxItemsToRetrieve As UInteger 
) As IAsyncOperation(Of IReadOnlyList)

Parameters

query

Type: CommonFolderQuery

The type of folder query to perform.

startIndex

Type: System.UInt32 [.NET] | uint32 [C++]

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

maxItemsToRetrieve

Type: System.UInt32 [.NET] | uint32 [C++]

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

Return value

Type: IAsyncOperation<IVectorView>

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

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.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage.Search
Windows::Storage::Search [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows 10 Mobile Insider Preview

Namespace

Windows.Storage.Search
Windows::Storage::Search [C++]

Metadata

Windows.winmd

See also

IStorageFolderQueryOperations interface
IStorageFolderQueryOperations.GetFoldersAsync(CommonFolderQuery) method
Windows.Foundation.IVectorView interface
Windows.Storage.StorageFolder class

 

 

Show:
© 2015 Microsoft