Click or drag to resize
GDStorageFolderGetFilesAsync Method
Gets all the files from the current folder.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public IAsyncOperation<IReadOnlyList<GDStorageFile>> GetFilesAsync()

Return Value

Type: IAsyncOperationIReadOnlyListGDStorageFile
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 GDStorageFile object.

Implements

IGDStorageFolderGetFilesAsync
Exceptions
ExceptionCondition
AccessDeniedException(C# equivalent: System.UnauthorizedAccessException) Secure storage was remotely wiped.
Remarks

This query is a shallow query that returns only files in the current folder.

To get items that are files or folders, call the GetItemsAsync method.

Examples
The following example shows how to get the files in the current folder.
using GD;

// Get the files in the GD secure storage root folder.
var filesInFolder = await GDWindows.Instance.SecureFolder.GetFilesAsync();

// Iterate over the results and print the list of files to the Visual Studio Output window.
foreach (GDStorageFile file in filesInFolder)
    Debug.WriteLine(file.Name + ", " + file.DateCreated);
See Also