aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-23 00:23:23 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-30 17:13:11 +0300
commitabfee51c362cb1ed2e8eb62fec12b3eb5ca03fb0 (patch)
tree3f08e73ecc447a9d05d340eeab169affb9e517b6 /libbutl/filesystem.ixx
parentb55143ecaa986aa3ba93dc6a078ed7d9cf495b1c (diff)
Add match_absent flag for path_{search,match}() functions
Diffstat (limited to 'libbutl/filesystem.ixx')
-rw-r--r--libbutl/filesystem.ixx26
1 files changed, 26 insertions, 0 deletions
diff --git a/libbutl/filesystem.ixx b/libbutl/filesystem.ixx
index 97891d5..866d603 100644
--- a/libbutl/filesystem.ixx
+++ b/libbutl/filesystem.ixx
@@ -105,6 +105,32 @@ namespace butl
static_cast<std::uint16_t> (y));
}
+ // path_match_flags
+ //
+ inline path_match_flags operator& (path_match_flags x, path_match_flags y)
+ {
+ return x &= y;
+ }
+
+ inline path_match_flags operator| (path_match_flags x, path_match_flags y)
+ {
+ return x |= y;
+ }
+
+ inline path_match_flags operator&= (path_match_flags& x, path_match_flags y)
+ {
+ return x = static_cast<path_match_flags> (
+ static_cast<std::uint16_t> (x) &
+ static_cast<std::uint16_t> (y));
+ }
+
+ inline path_match_flags operator|= (path_match_flags& x, path_match_flags y)
+ {
+ return x = static_cast<path_match_flags> (
+ static_cast<std::uint16_t> (x) |
+ static_cast<std::uint16_t> (y));
+ }
+
// dir_entry
//
inline entry_type dir_entry::