StorageFolder.GetFilesAsync() | getFilesAsync() method

Applies to Windows and Windows Phone

Gets the files in the current folder.

Syntax


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

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<IVectorView>

When this method completes successfully, it returns a list of the files in the current folder. The list is of type IReadOnlyList<StorageFile>. Each file in the list is represented by a StorageFile object.

Remarks

Calling the GetFilesAsync() method returns the same list of files as a call to the GetFilesAsync(CommonFileQuery) method that specifies the CommonFileQuery.DefaultQuery enumeration value.

This query is a shallow query that returns only items in the current folder. If you want deep query results that include items at all levels under the current folder, use one of the following options.

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(CommonFileQuery)

 

 

Show:
© 2014 Microsoft