NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Directory.Delete (String, Boolean)

Deletes directories and subdirectories and their contents from a path.

[Visual Basic]
Overloads Public Shared Sub Delete( _
   ByVal path As String, _
   ByVal recursive As Boolean _
)
[C#]
public static void Delete(
   string path,
   bool recursive
);
[C++]
public: static void Delete(
   String* path,
   bool recursive
);
[JScript]
public static function Delete(
   path : String,
   recursive : Boolean
);

Parameters

path
The fully qualified name of the directory to remove.
recursive
true to remove directories, subdirectories, and contents, otherwise false.

Exceptions

Exception Type Condition
IOException An I/O error occurs.
SecurityException The caller does not have the required permission.
ArgumentException The directory name is empty or contains only whitespaces.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Write flag required for write permission to the path.

See Also

Directory Class | Directory Members | System.IO Namespace | Directory.Delete Overload List