Aracılığıyla paylaş


StorageFileQueryResult.GetFilesAsync Method

Definition

Overloads

GetFilesAsync()

Retrieves a list of all the files in the query result set.

GetFilesAsync(UInt32, UInt32)

Retrieves a list of files in a specified range.

GetFilesAsync()

Retrieves a list of all the files in the query result set.

public:
 virtual IAsyncOperation<IVectorView<StorageFile ^> ^> ^ GetFilesAsync() = GetFilesAsync;
/// [Windows.Foundation.Metadata.Overload("GetFilesAsyncDefaultStartAndCount")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFile>> GetFilesAsync();
[Windows.Foundation.Metadata.Overload("GetFilesAsyncDefaultStartAndCount")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFile>> GetFilesAsync();
function getFilesAsync()
Public Function GetFilesAsync () As IAsyncOperation(Of IReadOnlyList(Of StorageFile))

Returns

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

Attributes

See also

Applies to

GetFilesAsync(UInt32, UInt32)

Retrieves a list of files in a specified range.

public:
 virtual IAsyncOperation<IVectorView<StorageFile ^> ^> ^ GetFilesAsync(unsigned int startIndex, unsigned int maxNumberOfItems) = GetFilesAsync;
/// [Windows.Foundation.Metadata.Overload("GetFilesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<StorageFile>> GetFilesAsync(uint32_t const& startIndex, uint32_t const& maxNumberOfItems);
[Windows.Foundation.Metadata.Overload("GetFilesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<StorageFile>> GetFilesAsync(uint startIndex, uint maxNumberOfItems);
function getFilesAsync(startIndex, maxNumberOfItems)
Public Function GetFilesAsync (startIndex As UInteger, maxNumberOfItems As UInteger) As IAsyncOperation(Of IReadOnlyList(Of StorageFile))

Parameters

startIndex
UInt32

unsigned int

uint32_t

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

maxNumberOfItems
UInt32

unsigned int

uint32_t

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.

Attributes

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.

See also

Applies to