QueryOptions Constructors

Definition

Overloads

QueryOptions()

Creates an instance of the QueryOptions class for enumerating storage items, and initializes it with the following default settings: QueryOptions.FolderDepth gets FolderDepth.Shallow and QueryOptions.IndexerOption gets IndexerOption.DoNotUseIndexer.

A QueryOptions object with the preceding options will provide shallow, folder-by-folder enumeration of the files and folders in a location. By default, folders are enumerated before files and both files and folders are alphabetized by name.

QueryOptions(CommonFolderQuery)

Creates an instance of the QueryOptions class for enumerating subfolders and initializes it with values based on the specified CommonFolderQuery.

QueryOptions(CommonFileQuery, IIterable<String>)

Creates an instance of the QueryOptions class for enumerating files and initializes it with values provided by the specified CommonFileQuery and an optional file type filter that determines which files to include in query results.

QueryOptions()

Creates an instance of the QueryOptions class for enumerating storage items, and initializes it with the following default settings: QueryOptions.FolderDepth gets FolderDepth.Shallow and QueryOptions.IndexerOption gets IndexerOption.DoNotUseIndexer.

A QueryOptions object with the preceding options will provide shallow, folder-by-folder enumeration of the files and folders in a location. By default, folders are enumerated before files and both files and folders are alphabetized by name.

public:
 QueryOptions();
 QueryOptions();
public QueryOptions();
function QueryOptions()
Public Sub New ()

See also

Applies to

QueryOptions(CommonFolderQuery)

Creates an instance of the QueryOptions class for enumerating subfolders and initializes it with values based on the specified CommonFolderQuery.

public:
 QueryOptions(CommonFolderQuery query);
 QueryOptions(CommonFolderQuery const& query);
public QueryOptions(CommonFolderQuery query);
function QueryOptions(query)
Public Sub New (query As CommonFolderQuery)

Parameters

query
CommonFolderQuery

An enumeration value that specifies how to group the contents of the folder where the query is created into subfolders to enumerate. The subfolders that are retrieved using a CommonFolderQuery can be actual file system folders or virtual folders that represent groups of files (which are determined by the CommonFolderQuery value). For example, the CommonFolderQuery.GroupByArtist uses the Artist of the files in the folder (and its subfolders) to group files, creating one virtual folder (or file group) for each artist.

See also

Applies to

QueryOptions(CommonFileQuery, IIterable<String>)

Creates an instance of the QueryOptions class for enumerating files and initializes it with values provided by the specified CommonFileQuery and an optional file type filter that determines which files to include in query results.

public:
 QueryOptions(CommonFileQuery query, IIterable<Platform::String ^> ^ fileTypeFilter);
 QueryOptions(CommonFileQuery const& query, IIterable<winrt::hstring> const& fileTypeFilter);
public QueryOptions(CommonFileQuery query, IEnumerable<string> fileTypeFilter);
function QueryOptions(query, fileTypeFilter)
Public Sub New (query As CommonFileQuery, fileTypeFilter As IEnumerable(Of String))

Parameters

query
CommonFileQuery

An enumeration value that specifies the search parameters to use to query files.

The CommonFileQuery enumeration provides search parameters for several common types of file queries. For example, deep queries that retrieve all the files in the folder where the query is created or shallow queries that retrieve only the files in the top-level of the folder. The enumeration also determines how query results are sorted.

fileTypeFilter

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

An array of file types to be included in the query results. To include all file types, supply null, an empty array, or an array containing a single entry of "*".

See also

Applies to