Otter SDK Reference
Version:

OpenFileAsync(string path, System.IO.FileMode fileMode, System.IO.FileAccess fileAccess) Method

Opens a file on the agent.

Syntax

public abstract Task<System.IO.Stream> OpenFileAsync(string path, System.IO.FileMode fileMode, System.IO.FileAccess fileAccess)

Parameters

path
Type: string

Full path of the file to open.

fileMode
Type: System.IO.FileMode

Specifies how the file should be opened.

fileAccess
Type: System.IO.FileAccess

Specifies the required access level of the file.

Returns

System.IO.Stream backed by the specified file.

Exceptions

System.ArgumentNullException

path is null (Nothing in Visual Basic) or an empty string.

System.NotSupportedException

The agent does not support the specified file operation.

System.IO.FileNotFoundException

The file cannot be found, such as when fileMode is FileMode.Truncate or FileMode.Open, and the file specified by path does not exist. The file must already exist in these modes.

System.IO.DirectoryNotFoundException

The specified path is invalid.