Stream Options Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a variety of configuration options for FileStream.
public ref class FileStreamOptions sealed
public sealed class FileStreamOptions
type FileStreamOptions = class
Public NotInheritable Class FileStreamOptions
Initializes a FileStreamOptions instance with default values.
A bitwise combination of the enumeration values that determines how the file can be accessed by the FileStream object. This also determines the values returned by the CanRead and CanWrite properties of the FileStream object.
The size of the buffer used by FileStream for buffering. The default buffer size is 4096. 0 or 1 means that buffering should be disabled. Negative values are not allowed.
One of the enumeration values that determines how to open or create the file.
A bitwise combination of the enumeration values that specifies additional file options. The default value is None, which indicates synchronous IO.
The initial allocation size in bytes for the file. A positive value is effective only when a regular file is being created or overwritten (Create or CreateNew). Negative values are not allowed. In other cases (including the default 0 value), it's ignored. This value is a hint and is not a strong guarantee. It is not supported on Web Assembly (WASM) and FreeBSD (the value is ignored). For Windows, Linux and macOS we will try to preallocate the disk space to fill the requested allocation size. If that turns out to be impossible, the operation is going to throw an exception. The final file length (EOF) will be determined by the number of bytes written to the file.
A bitwise combination of the enumeration values that determines how the file will be shared by processes. The default value is Read.
Determines whether the specified object is equal to the current object.(Inherited from Object)
Serves as the default hash function.(Inherited from Object)
Gets the Type of the current instance.(Inherited from Object)
Creates a shallow copy of the current Object.(Inherited from Object)
Returns a string that represents the current object.(Inherited from Object)