diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-22 17:43:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-22 17:43:09 +0200 |
commit | 8b98a6b3fae40487ac529a7118865df6a71159ee (patch) | |
tree | dcdc0a13ccec81c087ed05a9ebfe5cac3d56b955 /build2/filesystem.cxx | |
parent | ade763571a19b5e222ac626a6b3bc10685e542a1 (diff) |
Implement detection of ignorable changes (whitespaces, comments)
Diffstat (limited to 'build2/filesystem.cxx')
-rw-r--r-- | build2/filesystem.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/build2/filesystem.cxx b/build2/filesystem.cxx index 9d9b3b6..eefaf99 100644 --- a/build2/filesystem.cxx +++ b/build2/filesystem.cxx @@ -11,6 +11,22 @@ using namespace butl; namespace build2 { + bool + touch (const path& p, bool create, uint16_t v) + { + if (verb >= v) + text << "touch " << p; + + try + { + return touch_file (p, create); + } + catch (const system_error& e) + { + fail << "unable to touch file " << p << ": " << e << endf; + } + } + fs_status<mkdir_status> mkdir (const dir_path& d, uint16_t v) { |