FileStream Members

The following tables list the members exposed by the FileStream type.

Public Constructors

Name Description
Public Method 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
Public Property CanRead Gets a value indicating whether the current stream supports reading.
Public Property CanSeek Gets a value indicating whether the current stream supports seeking.
Public Property CanWrite Gets a value indicating whether the current stream supports writing.
Public Property IsAsync Gets a value indicating whether the FileStream was opened asynchronously or synchronously.
Public Property Length Gets the length in bytes of the stream.
Public Property Name Gets the name of the FileStream that was passed to the constructor.
Public Property Position Gets or sets the current position of this stream.

Public Methods

Name Description
Public Method Dispose Releases the unmanaged resources used by the FileStream and optionally releases the managed resources.
Public Method Flush Clears all buffers for this stream and causes any buffered data to be written to the file system.
Public Method Read Reads a block of bytes from the stream and writes the data in a given buffer.
Public Method Seek Sets the current position of this stream to the given value.
Public Method SetLength Sets the length of this stream to the given value.
Public Method Write Writes a block of bytes to this stream using data from a buffer.

See Also

Reference

FileStream Class
System.IO Namespace