Skip to main content

path_matches_pattern

Function path_matches_pattern 

Source
pub fn path_matches_pattern(path: &str, pattern: &str) -> bool
Expand description

Match a path against a glob-style include/exclude pattern.

Supports ** (any directories), * / ? within a path segment, and basename-only patterns such as test_*.rs (matched against any component). Patterns that do not start with **/ also match as a suffix of an absolute path (src/**/*.rs matches /proj/src/lib.rs).