Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StorageFolder.GetFilesAsync(CommonFileQuery) | getFilesAsync(CommonFileQuery) method

Applies to Windows and Windows Phone

Gets a list of all files in the current folder and its sub-folders. Files are filtered and sorted based on the specified CommonFileQuery.

Syntax


storageFolder.getFilesAsync(query).done( /* Your success and error handlers */ );

Parameters

query

Type: CommonFileQuery

The enum value that identifies the files to include in the list and how those files are sorted.

Return value

Type: IAsyncOperation<IVectorView>

When this method completes successfully, it returns a list of the files (type IVectorView) in the folder. Each file in the list is represented by a StorageFile object.

Remarks

Using a CommonFileQuery lets you get a list of files based on specific file attributes (like title and date) quickly and easily.

Windows Server 2012:  Not all CommonFileQuery values are available. Call GetIndexedStateAsync to determine whether the current StorageFolder object supports all queries.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

StorageFolder
GetFilesAsync(CommonFileQuery, UInt32, UInt32)
GetFilesAsync

 

 

Show:
© 2014 Microsoft