CommonFolderQuery enumeration

Applies to Windows and Windows Phone

Specifies how to group files into folders in the query results and determines whether the query is shallow or deep. Query results for deep queries include all files in all of the subfolders of the current folder, grouped into folders according to the specified option.

Syntax


public enum CommonFolderQuery

Attributes

[Version(0x06020000)]

Members

The CommonFolderQuery enumeration has these members.

MemberValueDescription
DefaultQuery | defaultQuery0

A shallow list of the folders in the current folder, similar to the view that File Explorer provides.

You can use this option with any storage location.

GroupByYear | groupByYear100

Group files into virtual folders by year based on the System.ItemDate property of each file. Each folder will contain all (and only) files that have values for System.ItemDate within the same year.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByMonth | groupByMonth101

Group files into virtual folders by month based on the System.ItemDate property of each file. Each folder will contain all (and only) files that have values for System.ItemDate within the same month.

You can use this option only for folders in a library or the HomeGroup folder.

This option only works if the folder being queried is in a library or the HomeGroup folder.

GroupByArtist | groupByArtist102

Group files into virtual folders based on the System.Music.Artistproperty of each file. Each folder will contain all (and only) files with identical values for System.Music.Artist.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByAlbum | groupByAlbum103

Group files into virtual folders by year based on the System.Music.AlbumTitle property of each file. Each folder will contain all (and only) files with identical values for System.Music.AlbumTitle.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByAlbumArtist | groupByAlbumArtist104

Group files into virtual folders based on the System.Music.AlbumArtist property of each file. Each folder will contain all (and only) files with identical values for System.Music.AlbumArtist.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByComposer | groupByComposer105

Group files into virtual folders based on the System.Music.Composer property of each file. Each folder will represent one composer, and contain all files whose System.Music.Composer vector contains that composer. If a file lists multiple composers, it may appear in more than one of the resulting folders.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByGenre | groupByGenre106

Group files into virtual folders based on the System.Music.Genre property of each file. Each folder will contain all (and only) files with identical values for System.Music.Genre.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByPublishedYear | groupByPublishedYear107

Group files into virtual folders by year based on the System.Media.Year property of each file. Each folder will contain all (and only) files that have values for System.Media.Year within the same year.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByRating | groupByRating108

Group files into virtual folders by rating (1 star, 2 stars, and so on) based on the System.Rating property of each file. Each folder will contain all (and only) files with identical values for System.Rating.

This option only works if the folder being queried is in a library or the HomeGroup folder.

GroupByTag | groupByTag109

Group files into virtual folders based on the System.Keywords property of each file. Each folder will represent one tag, and contain all files whose System.Keywords vector contains that tag. If a file lists multiple tags in its System.Keywords vector, it may appear in more than one of the resulting folders.

This option only works if the folder being queried is in a library or the HomeGroup folder.

GroupByAuthor | groupByAuthor110

Group files into virtual folders based on the System.Author property of each file. Each folder will represent one author, and contain all files whose System.Author vector contains that author. If a file lists multiple authors, it may appear in more than one of the resulting folders.

This option only works if the folder being queried is in a library or the HomeGroup folder.

GroupByType | groupByType111

Group files into virtual folders by type (for example, Word documents, text files, and so forth) based on the System.ItemTypeText property of each file.

This option only works if the folder being queried is in a library or the HomeGroup folder.

Remarks

Use a value from the CommonFolderQuery enumeration when you call one of the following methods of the StorageFolder class. For examples that use values from the CommonFolderQuery enumeration, see the topics for these methods.

These methods use the value from the CommonFolderQuery enumeration to initialize the DateStackOption, FolderDepth, IndexerOption, and SortOrder options of the query.

Call the StorageFolder.IsCommonFolderQuerySupported to determine whether the value that you want to use is available for the current folder.

Note  

When a query groups files into virtual folders based on a property that can have multiple values (for example, System.Author), a particular file may appear in more than one virtual folder because each folder represents one of the multiple values.

Files that don't have a value for the property that the query uses to group files are typically excluded from query results.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

queryOptions class
Windows.Storage.storageFolder class

 

 

Show:
© 2014 Microsoft