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

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public IAsyncAction DeleteAsync(
	StorageDeleteOption option
)

Parameters

option
Type: Windows.StorageStorageDeleteOption
This parameter is ignored.

Return Value

Type: IAsyncAction
No object or value is returned by this method when it completes.

Implements

IGDStorageItemDeleteAsync(StorageDeleteOption)
IGDStorageItemDeleteAsync(StorageDeleteOption)
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. Works exactly same way as DeleteAsync.
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 (parameter is ignored)
await testFolder.DeleteAsync(StorageDeleteOption.PermanentDelete);

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