pub fn matches_exclude_pattern(path: &str, pattern: &str) -> boolExpand description
Check if a path matches an exclude pattern
Exclude patterns support:
- Glob patterns:
*.min.js,src/**/*.test.ts - Path component matches:
tests,vendor,node_modules(matches directory names) - Prefix matches:
targetmatchestarget/debug/file.rs
Note: Pattern “target” will match “target/file.rs” and “src/target/file.rs” but NOT “src/target.rs” (where target is part of a filename).
§Arguments
path- File path to checkpattern- Exclude pattern
§Returns
Returns true if the path should be excluded.
§Examples
use infiniloom_engine::filtering::matches_exclude_pattern;
assert!(matches_exclude_pattern("src/tests/foo.rs", "tests"));
assert!(matches_exclude_pattern("node_modules/lib.js", "node_modules"));
assert!(matches_exclude_pattern("dist/bundle.min.js", "*.min.js"));