Method RemoveDirectory
RemoveDirectory(DirectoryInfo)
Recursively deletes a directory along with all its files and subdirectories. It first resets any special file attributes (like read-only or hidden) to ensure that all files and directories can be deleted without authorization issues.
Declaration
public static void RemoveDirectory(this DirectoryInfo directoryInfo)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | directoryInfo | The directory to be deleted. |