5 #ifndef CVMFS_PATH_FILTERS_DIRTAB_H_
6 #define CVMFS_PATH_FILTERS_DIRTAB_H_
63 pathspec(pathspec), is_negation(is_negation) {}
68 typedef std::vector<Rule>
Rules;
86 dt->
Open(dirtab_path);
98 virtual bool Parse(
const std::string &dirtab);
99 virtual bool Parse(FILE *dirtab_file);
109 virtual bool IsMatching(
const std::string &path)
const;
119 virtual bool IsOpposing(
const std::string &path)
const;
133 bool Open(
const std::string &dirtab_path);
135 virtual bool ParsePathspec(
const std::string &pathspec_str,
bool negation);
136 void AddRule(
const Rule &rule);
140 const std::string::const_iterator &end,
141 std::string::const_iterator *itr)
const
143 for (; *itr != end && **itr ==
' '; ++(*itr)) { }
155 #endif // CVMFS_PATH_FILTERS_DIRTAB_H_
virtual bool IsMatching(const std::string &path) const
std::vector< Rule > Rules
bool Open(const std::string &dirtab_path)
void SkipWhitespace(const std::string::const_iterator &end, std::string::const_iterator *itr) const
bool ParseLine(const std::string &line)
const Rules & positive_rules() const
static const char kCommentMarker
size_t PositiveRuleCount() const
virtual bool IsOpposing(const std::string &path) const
Rule(const Pathspec &pathspec, const bool is_negation)
static Dirtab * Create(const std::string &dirtab_path)
virtual bool ParsePathspec(const std::string &pathspec_str, bool negation)
void AddRule(const Rule &rule)
size_t NegativeRuleCount() const
virtual bool Parse(const std::string &dirtab)
const Rules & negative_rules() const
bool CheckRuleValidity() const
static const char kNegationMarker