Windows.Storage Namespace

提供用于在存储中枚举内容和在目录上执行高级查询语法 (AQS) 搜索的类。

应用程序可以各种形状检索内容集合,包括常规文件夹层次结构、平展列表和基于项属性(如年、月份、艺术家、相册等等)的媒体导向形状。此外,应用程序可以向系统索引添加内容和属性以支持对应用程序内容的快速搜索。

应用程序还可接收因创建、修改或删除文件而使集合发生更改时激发的事件。

对于单个项,系统会公开与该项关联的流(缩略图和项属性),并且提供创建和删除项的功能。

成员

Windows.Storage.Search命名空间 具有这些类型的成员:

Windows.Storage.Search命名空间 具有这些类。

说明
ContentIndexer Enables Windows Store app to place content properties in the system index.
ContentIndexerQuery Represents a query for content properties in the ContentIndexer.
HitFinder
IndexableContent Represents app content and properties that can be added to the ContentIndexer.
QueryOptions Specifies the parameters of a search query for enumerating the contents of storage folders.
SortEntryVector Provides access to the sorting criteria of the query results as a collection of SortEntry objects.
StorageFileQueryResult Provides access to the results of a query of the files in the location that is represented by a storageFolder object.
StorageFolderQueryResult Provides access to the results of a query that lists the folder (or file groups) in the folder being queried (which is represented by a storageFolder).
StorageItemQueryResult Provides access to the results of a query that lists all items including files and folders (or file groups) in the folder being queried (which is represented by a storageFolder).
ValueAndLanguage Specifies the language of a property, as a BCP-47 language code.

 

枚举

Windows.Storage.Search命名空间 具有这些枚举。

Enumeration说明
CommonFileQuery Specifies whether the query is shallow or deep and the sorting criteria to use for files in the query results. Query results for deep queries include all files in all of the subfolders of the folder being queried and sorts them based on the specified metadata.
CommonFolderQuery Specifies whether the query is shallow or deep and the sorting criteria to use to group files into folders in the query results.
DateStackOption Indicates the unit of time used to group files into folders if a CommonFolderQuery based on date is used to create a QueryOptions object.
FolderDepth Indicates whether all files and subfolders of the folder being queried will be enumerated or if only the top-level files and subfolders will be enumerated.
IndexedState Indicates whether a StorageFolder is included in the system index.
IndexerOption Specifies whether the query should use the system index of the file system when enumerating content in the folder being queried.

 

接口

Windows.Storage.Search命名空间 定义这些接口。

接口说明
IIndexableContent Represents app content and properties that can be added to the ContentIndexer.
IStorageFolderQueryOperations Provides methods to create search queries and retrieve files from a folder. This interface is implemented by StorageFolder objects, which can represent file system folders, libraries, or virtual folders that are automatically generated when queries are created using group-based CommonFolderQuery values like GroupByAlbum.
IStorageQueryResultBase Provides methods to access to and manage query results.

 

结构

Windows.Storage.Search命名空间 具有这些结构。

结构说明
SortEntry An entry in the SortOrder list the specifies a property and ordering that is used to sort query results.

 

要求

最低支持客户端

Windows 8.1

最低支持服务器

Windows Server 2012 R2

命名空间

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

元数据

Windows.winmd

 

 

显示:
© 2014 Microsoft