Windows Dev Center

StorageFolderQueryResult.GetFoldersAsync() | getFoldersAsync() 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.]

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

Syntax


storageFolderQueryResult.getFoldersAsync().done( /* Your success and error handlers */ );

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<IVectorView>

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.

Examples

Use the then or done method to capture and process the list of storageFolder objects that is returned by this method, as shown in the following example.


storageFolderQueryResults.getFoldersAsync().then(
    function (folders) {
        folders.forEach(
            function (folder) {
                // Process folder
            }
        ); 
    }
);

Requirements (Windows 10 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 (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows 10 Mobile

Namespace

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

Metadata

Windows.winmd

See also

storageFolderQueryResult class
storageFolderQueryResult.getFoldersAsync(startIndex, maxNumberOfItems) method
Windows.Foundation.Collections.IVectorView interface

 

 

Show:
© 2015 Microsoft