Client. Delete Async(String, CancellationToken) Method
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.
Asynchronous api to delete a file or directory. For directory it will only delete if it is empty.
public virtual System.Threading.Tasks.Task<bool> DeleteAsync (string path, System.Threading.CancellationToken cancelToken = default);
abstract member DeleteAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool> override this.DeleteAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function DeleteAsync (path As String, Optional cancelToken As CancellationToken = Nothing) As Task(Of Boolean)
Path of file or directory
CancellationToken to cancel the request
True if the path is deleted successfully else false