Content Studio Web Content Management System
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
A Stream to a file in the virtual file system
[This is preliminary documentation and is subject to change.]
Opens a file in the virtual file system using a specified virtual path.
Namespace: ContentStudio.Site.Storage
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
Parameters
- virtualPath
- Type: SystemString
The virtual path to the file in the virtual file system. - mode
- Type: System.IOFileMode
The file mode to use.
Return Value
Type: StreamA Stream to a file in the virtual file system
Implements
IWritableVirtualPathProviderOpen(String, FileMode)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 FileMode.Truncate or FileMode.Open, and the file specified by virtualPath does not exist. The file must already exist in these modes. |
NotSupportedException | FileMode.Append is not supported or the document type is not an uploaded file document. |
IOException | An I/O error occurs, such as specifying FileMode.CreateNew and the file specified by virtualPath already exists. |
DirectoryNotFoundException | The specified virtualPath is invalid, such as being on an unmapped drive. |
See Also