Skip to content

Method DeleteFileAsync

Namespace: Belay.Sync
Assembly: Belay.Sync.dll

DeleteFileAsync(string, CancellationToken)

Deletes a file from the device.

csharp
public Task DeleteFileAsync(string path, CancellationToken cancellationToken = default)

Parameters

path string

The file path to delete.

cancellationToken CancellationToken

Cancellation token to cancel the operation.

Returns

Task

Exceptions

FileNotFoundException

Thrown when the file does not exist.

UnauthorizedAccessException

Thrown when access is denied.

Released under the Apache License 2.0.