Content Studio Web Content Management System
Assembly: CS5Interfaces (in CS5Interfaces.dll) Version: 1.0.0.0 (1.0.0.0)
A read/write Stream that encapsulates the file identified by the virtualPath
[This is preliminary documentation and is subject to change.]
Opens the a file in a virtual file system with a virtual path and
creation mode.
Namespace: ContentStudio.Storage
Assembly: CS5Interfaces (in CS5Interfaces.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
Parameters
- virtualPath
- Type: SystemString
A virtual path for the file that returned Stream object will encapsulate. - mode
- Type: System.IOFileMode
A FileMode constant that determines how to open or create the virtual file.
Return Value
Type: StreamA read/write Stream that encapsulates the file identified by the virtualPath
Exceptions
Exception | Condition |
---|---|
ArgumentException | virtualPath is a zero-length string, contains only white space, or contains one or more invalid characters. |
ArgumentNullException | virtualPath is null |
SecurityException | The caller does not have the required permission. |
FileNotFoundException | The file cannot be found, such as when mode is Truncate or Open, and the file specified by virtualPath does not exist. The file must already exist in these modes. |
IOException | An I/O error occurs, such as specifying CreateNew and the file specified by virtualPath already exists. |
DirectoryNotFoundException | The specified virtualPath is invalid, such as being on an unmapped drive. |
See Also