Expand Minimize

StorageFolder.CreateItemQueryWithOptions | createItemQueryWithOptions method

Applies to Windows only

Creates a query result object to filter and enumerate top-level items (files and sub-folders) in the current folder. Items are included in the query result and sorted based on the specified QueryOptions.

Syntax


public StorageItemQueryResult CreateItemQueryWithOptions(
  QueryOptions queryOptions
)

Parameters

queryOptions

Type: QueryOptions

The enum value that identifies the items (files and folders) to include in the query result object and how those items are sorted.

Return value

Type: StorageItemQueryResult

A query result object to filter and enumerate the top-level files and sub-folders in the current folder.

Remarks

We recommend that you use AreQueryOptionsSupported to verify that the QueryOptions you specify are available for the current folder.

On DLNA devices:  Don't set QueryOptions.FolderDepth to FolderDepth.Deep; deep queries do not work if you are querying files in a DLNA device.

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

None supported

Namespace

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

Metadata

Windows.winmd

See also

StorageFolder

 

 

Show:
© 2014 Microsoft