StorageFolder.CreateFolderQuery(CommonFolderQuery) | createFolderQuery(CommonFolderQuery) method

Applies to Windows only

Creates a query result object to enumerate files in the current folder by grouping them into StorageFolder objects. Files are filtered and grouped based on the specified CommonFolderQuery.

Syntax


var storageFolderQueryResult = storageFolder.createFolderQuery(query);

Parameters

query

Type: CommonFolderQuery

The enum value that identifies how to group files into StorageFolder objects in the query result object.

Return value

Type: StorageFolderQueryResult

A query result object that can be used to filter and enumerate files in the current folder by their StorageFolder.

Remarks

Using a CommonFolderQuery lets you construct lists of folders and file groups based on specific file attributes (like title and date) quickly and easily.

We recommend that you call IsCommonFolderQuerySupported to verify that the CommonFolderQuery you specify is available for the current folder.

For Windows Server 2012:  You must install indexer components to use some CommonFolderQuery values because indexer components are not installed by default.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

StorageFolder
CreateFolderQuery

 

 

Show:
© 2014 Microsoft