StorageFile.DeleteAsync Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
DeleteAsync() |
Deletes the current file. |
DeleteAsync(StorageDeleteOption) |
Deletes the current file, optionally deleting the item permanently. |
Deletes the current file.
public:
virtual IAsyncAction ^ DeleteAsync() = DeleteAsync;
/// [Windows.Foundation.Metadata.Overload("DeleteAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction DeleteAsync();
[Windows.Foundation.Metadata.Overload("DeleteAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction DeleteAsync();
function deleteAsync()
Public Function DeleteAsync () As IAsyncAction
Returns
No object or value is returned by this method when it completes.
Implements
- Attributes
Remarks
This method uses StorageDeleteOption.default to determine whether the item is deleted permanently.
FileNotFoundException is thrown if the file does not exist..
See also
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
Deletes the current file, optionally deleting the item permanently.
public:
virtual IAsyncAction ^ DeleteAsync(StorageDeleteOption option) = DeleteAsync;
/// [Windows.Foundation.Metadata.Overload("DeleteAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction DeleteAsync(StorageDeleteOption const& option);
[Windows.Foundation.Metadata.Overload("DeleteAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction DeleteAsync(StorageDeleteOption option);
function deleteAsync(option)
Public Function DeleteAsync (option As StorageDeleteOption) As IAsyncAction
Parameters
- option
- StorageDeleteOption
A value that indicates whether to delete the item permanently.
Returns
No object or value is returned by this method when it completes.
Implements
- Attributes
See also
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |