28 auto matches(
const std::string& str)
const -> bool;
41 auto match_impl(
const char* pattern,
const char* str)
const -> bool;
67 const std::vector<std::string>& exclude_patterns = {});
A filter that combines include and exclude patterns for file/directory filtering.
pattern_filter()=default
Default constructor creates a filter that accepts everything.
auto has_patterns() const -> bool
Checks if this filter has any patterns.
void add_exclude_pattern(const std::string &pattern)
Adds an exclude pattern to the filter.
auto get_include_patterns() const -> const std::vector< wildcard_pattern > &
Gets all include patterns.
auto get_exclude_patterns() const -> const std::vector< wildcard_pattern > &
Gets all exclude patterns.
auto should_include_filename(const std::string &filename) const -> bool
Tests if a filename should be included based on the filter rules.
void add_include_pattern(const std::string &pattern)
Adds an include pattern to the filter.
auto should_include(const fs::path &path) const -> bool
Tests if a path should be included based on the filter rules Logic: (matches any include pattern OR n...
auto is_wildcard() const -> bool
Checks if this filter is effectively a wildcard (no restrictions)
A wildcard pattern matcher that supports * (match any sequence) and ? (match single character)
auto get_pattern() const -> const std::string &
Gets the original pattern string.
wildcard_pattern(const std::string &pattern)
Constructs a wildcard pattern from a string.
auto matches(const std::string &str) const -> bool
Tests if the given string matches this pattern.
auto make_pattern_filter(const std::string &pattern) -> pattern_filter
Convenience function to create a pattern filter from a single wildcard string Maintains backward comp...