OpenFileAsync(string fileName, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, bool requireRandomAccess) Method

Returns a stream backed by the specified file.

Syntax

public abstract Task<System.IO.Stream> OpenFileAsync(string fileName, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, bool requireRandomAccess)

Parameters

fileName
Type: string

The name of the file.

mode
Type: System.IO.FileMode

The file mode.

access
Type: System.IO.FileAccess

The required access.

share
Type: System.IO.FileShare

The desired sharing mode. Note that this is considered a hint only - implementors may choose to ignore this.

requireRandomAccess
Type: bool

Value indicating whether the returned stream must support seeking.

Returns

Stream backed by the specified file.