CSAspNetVirtualPathProviderOpen Method Content Studio 5.7 SDK
Content Studio Web Content Management 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

public Stream Open(
	string virtualPath,
	FileMode mode
)

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: Stream
A Stream to a file in the virtual file system

Implements

IWritableVirtualPathProviderOpen(String, FileMode)
Exceptions

ExceptionCondition
ArgumentExceptionvirtualPath is a zero-length string, contains only white space, or contains one or more invalid characters.
ArgumentNullExceptionvirtualPath is null
SecurityExceptionThe 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.
NotSupportedExceptionFileMode.Append is not supported or the document type is not an uploaded file document.
IOExceptionAn I/O error occurs, such as specifying FileMode.CreateNew and the file specified by virtualPath already exists.
DirectoryNotFoundExceptionThe specified virtualPath is invalid, such as being on an unmapped drive.
See Also

Reference