| GDStorageFolderDeleteAsync Method |
Deletes the current folder.
Namespace:
GD
Assembly:
GD (in GD.dll) Version: 255.255.255.255
Syntax Exceptions Exception | Condition |
---|
AccessDeniedException | (C# equivalent: System.UnauthorizedAccessException) Secure storage was remotely wiped. |
Remarks This method deletes items permanently. All child items will be deleted recursively.
Examples
The following example shows how to delete the current folder
using System.Diagnostics;
using GD;
var rootFolder = GDWindows.Instance.SecureFolder;
var testFolder = await rootFolder.CreateFolderAsync("TestFolder");
if(await rootFolder.TryGetItemAsync("TestFolder") != null)
Debug.WriteLine("Folder exists.");
else
Debug.WriteLine("Folder does not exist.");
await testFolder.DeleteAsync();
if(await rootFolder.TryGetItemAsync("TestFolder") != null)
Debug.WriteLine("Folder exists.");
else
Debug.WriteLine("Folder does not exist.");
See Also