Aracılığıyla paylaş


StorageItemQueryResult Class

Definition

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). You can use storageItemQueryResult to enumerate the files and folders in that StorageFolder.

public ref class StorageItemQueryResult sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class StorageItemQueryResult final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class StorageItemQueryResult
Public NotInheritable Class StorageItemQueryResult
Inheritance
Object Platform::Object IInspectable StorageItemQueryResult
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Note

Although it's not attributed with marshalling_behavior(agile), this class can be treated as agile. For more info, see Threading and Marshaling (C++/CX).

You can get a storageItemQueryResult object by calling the following methods from a StorageFolder or a FolderInformation object:

Properties

Folder

Gets the folder originally used to create the StorageItemQueryResult object. This folder represents the scope of the query.

Methods

ApplyNewQueryOptions(QueryOptions)

Modifies query results based on new QueryOptions.

FindStartIndexAsync(Object)

Retrieves the index of the item from the query results that most closely matches the specified property value. The property that is matched is determined by the first SortEntry of the QueryOptions.SortOrder list.

GetCurrentQueryOptions()

Retrieves the query options used to determine query results.

GetItemCountAsync()

Retrieves the number of items in the set of query results.

GetItemsAsync()

Retrieves a list of all the items (files and folders) in the query results set.

GetItemsAsync(UInt32, UInt32)

Retrieves a list of items (files and folders) in a specified range.

Events

ContentsChanged

Fires when an item is added to, deleted from, or modified in the folder being queried. This event only fires after GetItemsAsync has been called at least once.

OptionsChanged

Fires when the query options change.

Applies to

See also