Method ReadTextFileAsync
Namespace: Belay.Sync
Assembly: Belay.Sync.dll
ReadTextFileAsync(string, CancellationToken)
Reads the entire contents of a text file from the device.
csharp
Task<string> ReadTextFileAsync(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 string.
Exceptions
Thrown when the file does not exist.
Thrown when access is denied.