10 using namespace catalog;
14 dt->
Open(dirtab_path);
21 if (!has_positive_match) {
22 std::string current_path = path;
23 while (current_path.length() > 0) {
24 size_t new_length = current_path.find_last_of(
"/");
25 current_path = current_path.substr(0, new_length);
27 has_positive_match =
true;
33 return has_positive_match && !
IsOpposing(path);
41 std::string current_path = path;
42 while (current_path.length() > 0) {
43 size_t new_length = current_path.find_last_of(
"/");
44 current_path = current_path.substr(0, new_length);
72 std::string current_pathspec_str(pathspec_str);
73 while (current_pathspec_str.length() > 0) {
76 size_t new_length = current_pathspec_str.find_last_of(
"/");
77 current_pathspec_str = current_pathspec_str.substr(0, new_length);
static RelaxedPathFilter * Create(const std::string &dirtab_path)
virtual bool IsMatching(const std::string &path) const
bool Open(const std::string &dirtab_path)
virtual bool Parse(const std::string &dirtab)
virtual bool IsOpposing(const std::string &path) const
virtual bool IsMatching(const std::string &path) const
virtual bool ParsePathspec(const std::string &pathspec_str, bool negation)
virtual bool ParsePathspec(const std::string &pathspec_str, bool negation)
virtual bool IsOpposing(const std::string &path) const
virtual bool Parse(const std::string &dirtab)