| GDStorageFolderGetFolderAsync Method |
Gets the subfolder with the specified name from the current folder.
Namespace:
GD
Assembly:
GD (in GD.dll) Version: 255.255.255.255
Syntax public IAsyncOperation<GDStorageFolder> GetFolderAsync(
string name
)
public:
virtual IAsyncOperation<GDStorageFolder^>^ GetFolderAsync(
[InAttribute] String^ name
) sealed
function GetFolderAsync(name);
Parameters
- name
- Type: SystemString
The name (or path relative to the current folder) of the subfolder to get.
Return Value
Type:
IAsyncOperationGDStorageFolderWhen this method completes successfully, it returns a
GDStorageFolder that represents the specified subfolder.
Implements
IGDStorageFolderGetFolderAsync(String)Exceptions Exception | Condition |
---|
Exception | (C# equivalent: System.IO.FileNotFoundException) The specified folder does not exist. Check the value of name. |
AccessDeniedException | (C# equivalent: System.UnauthorizedAccessException) Secure storage was remotely wiped. |
InvalidArgumentException | (C# equivalent: System.ArgumentException) The path contains invalid characters, or the format of the path is incorrect. Check the value of name. |
Remarks Examples
The following example shows how to get a subfolder from the current folder by calling the
GetFolderAsync(String) method. This example also shows how to get a subfolder from a subfolder of the current folder by providing a relative path.
using GD;
GDStorageFolder rootFolder = GDWindows.Instance.SecureFolder;
GDStorageFolder subFolder1 = await rootFolder.CreateFolderAsync("Subfolder1");
GDStorageFolder subFolder2 = await subFolder1.CreateFolderAsync("Subfolder2");
GDStorageFolder level1Folder = await rootFolder.GetFolderAsync("Subfolder1");
GDStorageFolder level2Folder = await rootFolder.GetFolderAsync(@"Subfolder1\Subfolder2");
See Also