Windows.Storage.Search.StorageFileQueryResult.GetFilesAsync

September 14, 2022 ยท View on GitHub

-description

Retrieves a list of files in a specified range.

-parameters

-param startIndex

The zero-based index of the first file to retrieve. This parameter is 0 by default.

-param maxNumberOfItems

The maximum number of files to retrieve. Use the max value of UInt32 (e.g. uint.MaxValue in C#, std::numeric_limits<uint32_t>::max() in C++. Some code in C++ may use -1 if implicit conversion is allowed) to retrieve all files. If the range contains fewer files than the max number, all files in the range are returned.

-returns

When this method completes successfully, it returns a list (type IVectorView) of files that are represented by StorageFile objects.

-remarks

Use this overload to improve system performance by presenting a virtualized view of the query results that includes only the necessary subset of files. For example, if your app displays many files in a gallery you could use this range to retrieve only the files that are currently visible to the user.

-examples

-see-also

StorageFileQueryResult class, StorageFileQueryResult.GetFilesAsync() method, Windows.Foundation.Collections.IVectorView interface