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

[This is preliminary documentation and is subject to change.]

Deletes a directory in a virtual file system and, if indicated, any subdirectory and file in the directory.

Namespace: ContentStudio.Storage
Assembly: CS5Interfaces (in CS5Interfaces.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

void DeleteDirectory(
	string virtualPath,
	bool recursive
)

Parameters

virtualPath
Type: SystemString
The virtual path of the directory to remove.
recursive
Type: SystemBoolean

true to remove directories, subdirectories, and files in virtualPath; otherwise, false.

When recursive is false the directory must be empty

Exceptions

ExceptionCondition
IOException The directory specified by path is read-only, or recursive is false and virtualPath is not an empty directory.
DirectoryNotFoundException
UnauthorizedAccessException The caller does not have the required permission.
ArgumentExceptionvirtualPath is a zero-length string, contains only white space, or contains one or more invalid characters.
ArgumentNullExceptionvirtualPath is null
NotSupportedException The operation is not supported.
See Also

Reference