Click or drag to resize
GDStorageFolderGetFoldersAsync Method
Gets all the subfolders in the current folder.

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

Return Value

Type: IAsyncOperationIReadOnlyListGDStorageFolder
When this method completes successfully, it returns a list of the subfolders (type IVectorView) in the folder. Each file in the list is represented by a GDStorageFile object.

Implements

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

This query is a shallow query that returns only subfolders 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 subfolders in the current folder.
using GD;

// Get the subfolders in the GD secure storage root folder.
var subfolders = await GDWindows.Instance.SecureFolder.GetFoldersAsync();

// Iterate over the results and print the list of folders and files to the Visual Studio Output window.
foreach (GDStorageFolder folder in subfolders)
    Debug.WriteLine(folder.Name);
See Also