Creates a query result object to filter and enumerate all the files in the current folder and its subfolders. Files are filtered and sorted based on the specified CommonFileQuery.
Syntax
var storageFileQueryResult = storageFolder.createFileQuery(query);
Parameters
- query
-
Type: CommonFileQuery
The enum value that identifies the files to include in the query result object and how those files are sorted.
Return value
Type: StorageFileQueryResult
A query result object of all the files in the current folder and its subfolders based on the specified CommonFileQuery.
Remarks
Using a CommonFileQuery lets you construct query result objects based on specific file attributes (like title and date) quickly and easily. You can also create query results based on your own criteria by constructing a QueryOptions object and calling CreateFileQueryWithOptions.
We recommend that you call IsCommonFileQuerySupported to verify that the CommonFileQuery you specify is available for the current folder.
For Windows Server 2012: You must install indexer components to use some CommonFileQuery values because indexer components are not installed by default.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 2/25/2013