IFileSystemProvider.ReadFileAsync(Uri, PipeWriter, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads the contents of a file into a pipe.
public:
System::Threading::Tasks::Task ^ ReadFileAsync(Uri ^ uri, System::IO::Pipelines::PipeWriter ^ writer, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ReadFileAsync (Uri uri, System.IO.Pipelines.PipeWriter writer, System.Threading.CancellationToken cancellationToken);
abstract member ReadFileAsync : Uri * System.IO.Pipelines.PipeWriter * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ReadFileAsync (uri As Uri, writer As PipeWriter, cancellationToken As CancellationToken) As Task
Parameters
- uri
- Uri
The file to read.
- writer
- PipeWriter
The writer for the pipe to which the file's contents are written.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A task representing the asynchronous read operation.
Exceptions
uri
or writer
is null.
The file does not exist.
Remarks
The complete contents of the file are not necessarily available in writer
's pipe when the returned task completes. Rather, the complete contents of the file will be available in the pipe when writer
itself is completed.