VirtualPathAdapterDeleteDirectory 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: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public 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

Implements

IWritableVirtualPathProviderDeleteDirectory(String, Boolean)
Exceptions

ExceptionCondition
IOExceptionThe directory specified by path is read-only, or recursive is false and virtualPath is not an empty directory.
DirectoryNotFoundException
UnauthorizedAccessExceptionThe 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
NotSupportedExceptionThe operation is not supported.
See Also

Reference