IWritableVirtualPathProviderOpen Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[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

Stream Open(
	string virtualPath,
	FileMode mode
)

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: Stream
A read/write Stream that encapsulates the file identified by the virtualPath
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 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

Reference