Class FileStream
Exposes a stream around a file, supporting both synchronous and asynchronous read and write operations.
public abstract class FileStream : Stream
- Inheritance
-
objectMarshalByRefObjectStreamFileStream
- Derived
- Extension Methods
Constructors
FileStream(string)
Creates new instance of FileStream object.
protected FileStream(string path)
Parameters
path
stringFile 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
stringPath to file
mode
FileModeFile mode
Returns
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
stringPath to file
mode
FileModeFile mode
access
FileAccessFile access
Returns
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
stringPath to file
mode
FileModeFile mode
access
FileAccessFile access
share
FileShareSharing permissions
Returns
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
stringPath to file
mode
FileModeFile mode
access
FileAccessFile access
share
FileShareSharing permissions
bufferSize
intBuffer size