Table of Contents

Method Open

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Open(string, FileMode)

Opens a Stream on the specified path with read/write access with no sharing.

public static Stream Open(string path, FileMode mode)

Parameters

path string

The file to open.

mode FileMode

A FileMode value that specifies whether a file is created if one does not exist. Also determines whether the contents of existing file is retained or overwritten.

Returns

Stream

A Stream opened in the specified mode and path, with read/write access and not shared.

Open(string, FileMode, FileAccess)

Opens a Stream on the specified path, with the specified mode and access with no sharing.

public static Stream Open(string path, FileMode mode, FileAccess access)

Parameters

path string

The file to open.

mode FileMode

A FileMode value that specifies whether a file is created if one does not exist. Also determines whether the contents of existing file is retained or overwritten.

access FileAccess

A FileAccess value that specifies the operations that can be performed on the file.

Returns

Stream

A Stream on the specified path, having the specified parameters.

Open(string, FileMode, FileAccess, FileShare)

Opens a Stream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.

public static Stream Open(string path, FileMode mode, FileAccess access, FileShare share)

Parameters

path string

The file to open.

mode FileMode

A FileMode value that specifies whether a file is created if one does not exist. Also determines whether the contents of existing file is retained or overwritten.

access FileAccess

A FileAccess value that specifies the operations that can be performed on the file.

share FileShare

A FileShare value specifying the type of access other threads have to the file.

Returns

Stream