Method DeleteDirectoryAsync
Namespace: Belay.Sync
Assembly: Belay.Sync.dll
DeleteDirectoryAsync(string, bool, CancellationToken)
Deletes a directory from the device.
csharp
public Task DeleteDirectoryAsync(string path, bool recursive = false, CancellationToken cancellationToken = default)
Parameters
path
string
The directory path to delete.
recursive
bool
Whether to delete the directory and all its contents.
cancellationToken
CancellationToken
Cancellation token to cancel the operation.
Returns
Exceptions
Thrown when the directory does not exist.
Thrown when access is denied.
Thrown when the directory is not empty and recursive is false.