FileStream Members
The following tables list the members exposed by the FileStream type.
Public Constructors
Name | Description | |
---|---|---|
FileStream | Initializes a new instance of the FileStream class with the specified path, creation mode, read/write and sharing permission, and buffer size. |
Public Properties
Name | Description | |
---|---|---|
CanRead | Gets a value indicating whether the current stream supports reading. | |
CanSeek | Gets a value indicating whether the current stream supports seeking. | |
CanWrite | Gets a value indicating whether the current stream supports writing. | |
IsAsync | Gets a value indicating whether the FileStream was opened asynchronously or synchronously. | |
Length | Gets the length in bytes of the stream. | |
Name | Gets the name of the FileStream that was passed to the constructor. | |
Position | Gets or sets the current position of this stream. |
Public Methods
Name | Description | |
---|---|---|
Dispose | Releases the unmanaged resources used by the FileStream and optionally releases the managed resources. | |
Flush | Clears all buffers for this stream and causes any buffered data to be written to the file system. | |
Read | Reads a block of bytes from the stream and writes the data in a given buffer. | |
Seek | Sets the current position of this stream to the given value. | |
SetLength | Sets the length of this stream to the given value. | |
Write | Writes a block of bytes to this stream using data from a buffer. |