From 43c591d58e3a2c77185f2f62348dc3f049764819 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Sep 2015 11:21:42 +0200 Subject: Add support for not removing directory itself in rmdir_r() --- butl/filesystem | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'butl/filesystem') diff --git a/butl/filesystem b/butl/filesystem index 9168f19..5b1c656 100644 --- a/butl/filesystem +++ b/butl/filesystem @@ -71,10 +71,11 @@ namespace butl try_rmdir_r (const dir_path&); // As above but throws rather than returns not_exist if the directory - // does not exist, so check before calling. + // does not exist, so check before calling. If the second argument is + // false, the the directory itself is not removed. // void - rmdir_r (const dir_path&); + rmdir_r (const dir_path&, bool dir = true); // Try to remove the file (or symlinks) returning not_exist if // it does not exist. All other errors are reported by throwing -- cgit v1.1