| GDStorageFolderDeleteAsync Method (StorageDeleteOption) |
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. Works exactly same way as
DeleteAsync.
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(StorageDeleteOption.PermanentDelete);
if(await rootFolder.TryGetItemAsync("TestFolder") != null)
Debug.WriteLine("Folder exists.");
else
Debug.WriteLine("Folder does not exist.");
See Also