OpenReadAsync(string fileName, FileAccessHints hints, System.Threading.CancellationToken cancellationToken) Method

Returns a System.IO.Stream backed by the specified file. The file must exist, and is only guaranteed to allow sequential read access.

Syntax

public virtual Task<System.IO.Stream> OpenReadAsync(string fileName, FileAccessHints hints, System.Threading.CancellationToken cancellationToken)

Parameters

fileName
Type: string

The full path of the file to open in the FileSystem.

hints
Type: FileAccessHints

Hints used to optimize performance of the returned System.IO.Stream.

cancellationToken
Type: System.Threading.CancellationToken

Cancellation token.

Returns

System.IO.Stream backed by the specified file if it exists. May be null (Nothing in Visual Basic) if the file does not exist.