Gets an index-based range of files from the list of all files in the current the current folder and its sub-folders. Files are filtered and sorted based on the specified CommonFileQuery and are included in the range based on the resulting indexes.
Syntax
storageFolder.getFilesAsync(query, startIndex, maxItemsToRetrieve).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.
- startIndex
-
Type: Number [JavaScript] | System.UInt32 [.NET] | uint32 [C++]
The zero-based index of the first file in the range to retrieve.
- maxItemsToRetrieve
-
Type: Number [JavaScript] | System.UInt32 [.NET] | uint32 [C++]
The maximum number of files to retrieve.
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.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 2/25/2013