Skip to content

Method CreateDirectoryAsync

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

CreateDirectoryAsync(string, bool, CancellationToken)

Creates a directory on the device.

csharp
Task CreateDirectoryAsync(string path, bool recursive = false, CancellationToken cancellationToken = default)

Parameters

path string

The directory path to create.

recursive bool

Whether to create parent directories if they don't exist.

cancellationToken CancellationToken

Cancellation token to cancel the operation.

Returns

Task

Exceptions

UnauthorizedAccessException

Thrown when access is denied.

IOException

Thrown when an I/O error occurs.

Released under the Apache License 2.0.