Share via


StorageFile.DeleteAsync Method

Definition

Overloads

DeleteAsync()

Deletes the current file.

DeleteAsync(StorageDeleteOption)

Deletes the current file, optionally deleting the item permanently.

DeleteAsync()

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

DeleteAsync(StorageDeleteOption)

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