C#
Parameters
- path
- The name of the empty directory to remove. This directory must be writable and empty.
Exception | Description |
---|---|
System.IO.IOException | A file with the same name and location specified by path exists. -or- The directory is the application's current working directory. -or- The directory specified by path is not empty. -or- The directory is read-only or contains a read-only file. -or- The directory is being used by another process. |
System.UnauthorizedAccessException | The caller does not have the required permission. |
System.ArgumentException | path is a zero-length string, contains only white space, or contains one or more invalid characters. |
System.ArgumentNullException | path 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). |
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