From abfee51c362cb1ed2e8eb62fec12b3eb5ca03fb0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 23 Nov 2018 00:23:23 +0300 Subject: Add match_absent flag for path_{search,match}() functions --- libbutl/filesystem.ixx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'libbutl/filesystem.ixx') 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 (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 ( + static_cast (x) & + static_cast (y)); + } + + inline path_match_flags operator|= (path_match_flags& x, path_match_flags y) + { + return x = static_cast ( + static_cast (x) | + static_cast (y)); + } + // dir_entry // inline entry_type dir_entry:: -- cgit v1.1