Method ReadFileAsync
Namespace: Belay.Sync
Assembly: Belay.Sync.dll
ReadFileAsync(string, CancellationToken)
Reads the entire contents of a file from the device.
csharp
Task<byte[]> ReadFileAsync(string path, CancellationToken cancellationToken = default)
Parameters
path
string
The file path to read.
cancellationToken
CancellationToken
Cancellation token to cancel the operation.
Returns
The file contents as a byte array.
Exceptions
Thrown when the file does not exist.
Thrown when access is denied.