Expand Minimize

StorageFolder.CreateFileQueryWithOptions | createFileQueryWithOptions method

Applies to Windows and Windows Phone

Creates a query result object to filter and enumerate the files in the current folder and its subfolders. Files are included in the query result and sorted based on the specified QueryOptions.

Syntax


Public Function CreateFileQueryWithOptions(
  queryOptions As QueryOptions 
) As StorageFileQueryResult

Parameters

queryOptions

Type: QueryOptions

The criterion that are applied to include and sort files in the query result object.

Return value

Type: StorageFileQueryResult

A query result object of all the files in the current folder and its subfolders based on the specified QueryOptions.

Remarks

We recommend that you use AreQueryOptionsSupported to verify that the QueryOptions you specify are available for the current folder. You can also check if a specific CommonFileQuery or CommonFolderQuery value is available, by calling IsCommonFileQuerySupported or IsCommonFolderQuerySupported, respectively.

You can use QueryOptions and CreateFileQueryWithOptions to create an indexed backed file query that lets you get properties that rely on another app's property handler. For more information, see QueryOptions.

For Windows Server 2012:  You must install indexer components to use some QueryOptions 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

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

Metadata

Windows.winmd

See also

StorageFolder

 

 

Show:
© 2014 Microsoft