| GDStorageFileDeleteAsync Method (StorageDeleteOption) |
Deletes the current file.
Namespace:
GD
Assembly:
GD (in GD.dll) Version: 255.255.255.255
Syntax Exceptions Exception | Condition |
---|
Exception |
File could not be deleted. To handle all the reasons why the file was not deleted, you must catch all of these exceptions:
|
Remarks This method always deletes files permanently.
Examples
The following example shows how to delete file that has the specified absolute path in the SDK secure storage.
using GD;
...
GDStorageFolder secureFolder = GDWindows.Instance.SecureFolder;
string newFileName = "test.txt";
GDStorageFile newFile = await tempFolder.CreateFileAsync(newFileName);
await newFile.DeleteAsync(StorageDeleteOption.Default);
See Also