Deletes a directory and its contents from a specified path.
[Visual Basic] Overloads Public Shared Sub Delete( _ ByVal path As String _ ) [C#] public static void Delete( string path ); [C++] public: static void Delete( String* path ); [JScript] public static function Delete( path : String );
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. |
NGWS Runtime Security:
FileIOPermissionAccess | Write flag required for write permission to the path. |
Directory Class | Directory Members | System.IO Namespace | Directory.Delete Overload List