Platform Core .NET Assemblies API
Delete(String,Boolean) Method
See Also  Send Feedback
Terrasoft.IO Namespace > IDirectory Interface > Delete Method : Delete(String,Boolean) Method
path
The name of the empty directory to remove.
recursive
true to remove directories, subdirectories, and files in path; otherwise, false.

Glossary Item Box

Deletes the specified directory and, if indicated, any subdirectories and files in the directory.

Syntax

 
C#
 
 

Parameters

path
The name of the empty directory to remove.
recursive
true to remove directories, subdirectories, and files in path; otherwise, false.

Exceptions

ExceptionDescription
System.IO.IOException

A file with the same name and location specified by path exists.

-or-

The directory specified by path is read-only, or recursive is false and path is not an empty directory.

-or-

The directory is the application's current working directory.

-or-

The directory is read-only or contains a read-only file.

-or-

The directory is being used by another process.

System.UnauthorizedAccessExceptionThe caller does not have the required permission.
System.ArgumentExceptionpath is a zero-length string, contains only white space, or contains one or more invalid characters.
System.ArgumentNullExceptionpath is null.
System.IO.DirectoryNotFoundException

path does not exist or could not be found.

-or-

The specified path is invalid (for example, it is on an unmapped drive).

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© Terrasoft 2002-2018.