1
2
3
4
5
6 using System;
7 using System.IO;
8
9 void RemoveDirectory(const string& dirPath, bool verbose)
10 {
11 if (IsDirectoryEmpty(dirPath))
12 {
13 System.IO.RemoveDirectory(dirPath);
14 if (verbose)
15 {
16 Console.Out() << "directory '" << dirPath << "' removed" << endl();
17 }
18 }
19 else
20 {
21 throw FileSystemException("directory '" + dirPath + "' is not empty");
22 }
23 }