StorageFileQueryResult class

Applies to Windows only

Provides access to the results of a query of the files in the location that is represented by a storageFolder object. You can use storageFileQueryResult to enumerate the files in that storageFolder location.

Syntax


public ref class StorageFileQueryResult sealed : IStorageQueryResultBase

Attributes

[Version(0x06020000)]

Members

The StorageFileQueryResult class has these types of members:

Events

The StorageFileQueryResult class has these events.

EventDescription
ContentsChanged
OptionsChanged

 

Methods

The StorageFileQueryResult class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
ApplyNewQueryOptions
FindStartIndexAsync
GetCurrentQueryOptions
GetFilesAsync()
GetFilesAsync(UInt32, UInt32)
GetItemCountAsync
GetMatchingPropertiesWithRanges

 

Properties

The StorageFileQueryResult class has these properties.

PropertyAccess typeDescription

Folder

Read-only

 

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 storageFileQueryResult object by calling the following methods from a storageFolder or a folderInformation object:

For more code examples that show you how to use storageFileQueryResult objects, see the Folder enumeration sample and the File system search sample.

Examples

This example demonstrates how to get a list of files from a storageFileQueryResult object.

No code example is currently available or this language may not be supported.

The query variable gets the storageFileQueryResult that is used to retrieve files that meet the criteria of the query.

Note  You need the Pictures library capability to access the library using KnownFolders.PicturesLibrary. To learn more about capabilities and file access, see File access and permissions in Windows Store app.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

Windows.Storage.storageFolder.createFileQuery methods
Windows.Storage.storageFolder.createFileQueryWithOptions method
Windows.Storage.BulkAccess.folderInformation.createFileQuery
Windows.Storage.BulkAccess.folderInformation.createFileQueryWithOptions

 

 

Show:
© 2014 Microsoft