Click or drag to resize
GDStorageFolderDeleteAsync Method
Deletes the current folder.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
Exceptions
ExceptionCondition
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; // For writing results to Output window.
using GD;

// Create folder
var rootFolder = GDWindows.Instance.SecureFolder;
var testFolder = await rootFolder.CreateFolderAsync("TestFolder");

// Has the folder been created?
if(await rootFolder.TryGetItemAsync("TestFolder") != null)
    Debug.WriteLine("Folder exists.");
else
    Debug.WriteLine("Folder does not exist.");

// Delete
await testFolder.DeleteAsync();

// Has the folder been deleted?
if(await rootFolder.TryGetItemAsync("TestFolder") != null)
    Debug.WriteLine("Folder exists.");
else
    Debug.WriteLine("Folder does not exist.");
See Also