diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-11 12:12:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-11 12:12:08 +0200 |
commit | 9f34890ff201588e829174f5e19634ddcd159206 (patch) | |
tree | bcf66d329e6d4390306e836e743097f532cef67c /bpkg/utility.cxx | |
parent | a880d01c59c6962f06b969552a524792239e9300 (diff) |
Add tracing to mk(), rm() functions
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r-- | bpkg/utility.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx index 1cd518b..f1e9a5a 100644 --- a/bpkg/utility.cxx +++ b/bpkg/utility.cxx @@ -36,7 +36,7 @@ namespace bpkg { try { - return file_exists (d); + return dir_exists (d); } catch (const system_error& e) { @@ -63,6 +63,9 @@ namespace bpkg void mk (const dir_path& d) { + if (verb >= 3) + text << "mkdir " << d; + try { try_mkdir (d); @@ -76,6 +79,9 @@ namespace bpkg void mk_p (const dir_path& d) { + if (verb >= 3) + text << "mkdir -p " << d; + try { try_mkdir_p (d); @@ -89,6 +95,9 @@ namespace bpkg void rm_r (const dir_path& d, bool dir) { + if (verb >= 3) + text << "rmdir -r " << d << (dir ? "" : "*"); + try { rmdir_r (d, dir); |