CachedFileStream(String, FileMode) Constructor
Initializes a new instance of the
FileStream class with the specified path, creation mode, read/write and sharing permission, the access other FileStreams can have to the same file, the buffer size, and additional file options.
Namespace: IOAssembly: Gemstone.IO (in Gemstone.IO.dll) Version: 1.0.128 -- Release Build+2960d3f3619fdc53cad514a51817286dcfb19027
Gemstone.IO.CachedFileStream = function(path, mode);
Parameters
- path String
- A relative or absolute path for the file that the current FileStream object will encapsulate.
- mode FileMode
- A constant that determines how to open or create the file.
ArgumentNullException | path is null. |
ArgumentException | path is an empty string (""), contains only white space, or contains one or more invalid characters. -or-path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. |
NotSupportedException | path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. |
ArgumentOutOfRangeException | mode contains an invalid value. |
FileNotFoundException | The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open, and the file specified by path does not exist. The file must already exist in these modes. |
IOException | An I/O error, such as specifying FileMode.CreateNew when the file specified by path already exists, occurred.-or-The stream has been closed. |
SecurityException | The caller does not have the required permission. |
DirectoryNotFoundException | The specified path is invalid, such as being on an unmapped drive. |
PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. |