Method ListAsync
Namespace: Belay.Sync
Assembly: Belay.Sync.dll
ListAsync(string, bool, CancellationToken)
Lists the contents of a directory on the device.
csharp
public Task<IReadOnlyList<DeviceFileInfo>> ListAsync(string path = "/", bool recursive = false, CancellationToken cancellationToken = default)
Parameters
path
string
The directory path to list. Use "/" for root directory.
recursive
bool
Whether to list contents recursively.
cancellationToken
CancellationToken
Cancellation token to cancel the operation.
Returns
Task<IReadOnlyList<DeviceFileInfo>>
A collection of file and directory information.
Exceptions
Thrown when the directory does not exist.
Thrown when access is denied.