diff options
Diffstat (limited to 'libbuild2/filesystem.cxx')
-rw-r--r-- | libbuild2/filesystem.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libbuild2/filesystem.cxx b/libbuild2/filesystem.cxx index 0072408..fbe145c 100644 --- a/libbuild2/filesystem.cxx +++ b/libbuild2/filesystem.cxx @@ -297,4 +297,30 @@ namespace build2 // return rmdir (ctx, d, verbosity); } + + permissions + path_perms (const path& p) + { + try + { + return path_permissions (p); + } + catch (const system_error& e) + { + fail << "unable to obtain path " << p << " permissions: " << e << endf; + } + } + + void + path_perms (const path& p, permissions f) + { + try + { + path_permissions (p, f); + } + catch (const system_error& e) + { + fail << "unable to set path " << p << " permissions: " << e; + } + } } |