Table of Contents

Class FileStream

Namespace
CMS.IO
Assembly
CMS.IO.dll

Exposes a stream around a file, supporting both synchronous and asynchronous read and write operations.

public abstract class FileStream : Stream
Inheritance
object
MarshalByRefObject
Stream
FileStream
Derived
Extension Methods

Constructors

FileStream(string)

Creates new instance of FileStream object.

protected FileStream(string path)

Parameters

path string

File path

Properties

Path

Stream path

public string Path { get; protected set; }

Property Value

string

Methods

New(string, FileMode)

Initializes new instance and intializes new system file stream.

public static FileStream New(string path, FileMode mode)

Parameters

path string

Path to file

mode FileMode

File mode

Returns

FileStream

New(string, FileMode, FileAccess)

Initializes new instance and intializes new system file stream.

public static FileStream New(string path, FileMode mode, FileAccess access)

Parameters

path string

Path to file

mode FileMode

File mode

access FileAccess

File access

Returns

FileStream

New(string, FileMode, FileAccess, FileShare)

Initializes new instance and intializes new system file stream.

public static FileStream New(string path, FileMode mode, FileAccess access, FileShare share)

Parameters

path string

Path to file

mode FileMode

File mode

access FileAccess

File access

share FileShare

Sharing permissions

Returns

FileStream

New(string, FileMode, FileAccess, FileShare, int)

Initializes new instance and intializes new system file stream.

public static FileStream New(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)

Parameters

path string

Path to file

mode FileMode

File mode

access FileAccess

File access

share FileShare

Sharing permissions

bufferSize int

Buffer size

Returns

FileStream