pub fn matches_dir(&self, path: &Path) -> bool {
        self.with_absolute_path(path, |path| {
            let mut path = path.to_string_lossy();
            if !path.ends_with(MAIN_SEPARATOR) {
                path.push(MAIN_SEPARATOR);
            }
            (self.included_paths.is_empty()
                || self
                    .included_paths
                    .iter()
                    .any(|p| p.matches_partially(&path)))
                && self.excluded_paths.iter().all(|p| !p.matches_prefix(&path))
        })
    }
/// Returns true if the given directory may contain matching paths.
/// Used to decide whether the directory walk should descend to that directory.
/// The directory should be allowed only if:
/// 1. all its components match a prefix of at least one include filter,
/// 2. it doesn't match any of the exclude filters ending with `**` pattern.
Returns true if the given directory may contain matching paths.
Used to decide whether the directory walk should descend to that directory.
The directory should be allowed only if:
1. all its components match a prefix of at least one include filter,
2. it doesn't match any of the exclude filters ending with `**` pattern.
Returns true if the given directory may contain matching paths . Used to decide whether the directory walk should descend to that directory . The directory should be allowed only if : 1 . all its components match a prefix of at least one include filter 2 . it doesn ' t match any of the exclude filters ending with ` ** ` pattern .
pub fn matches_dir(&self, path: &Path) -> bool {
        self.with_absolute_path(path, |path| {
            let mut path = path.to_string_lossy();
            if !path.ends_with(MAIN_SEPARATOR) {
                path.push(MAIN_SEPARATOR);
            }
            (self.included_paths.is_empty()
                || self
                    .included_paths
                    .iter()
                    .any(|p| p.matches_partially(&path)))
                && self.excluded_paths.iter().all(|p| !p.matches_prefix(&path))
        })
    }
pub fn matches_dir ( & self , path : & Path ) -> bool { self . with_absolute_path ( path , | path | { let mut path = path . to_string_lossy ( ) ; if ! path . ends_with ( MAIN_SEPARATOR ) { path . push ( MAIN_SEPARATOR ) ; } ( self . included_paths . is_empty ( ) || self . included_paths . iter ( ) . any ( | p | p . matches_partially ( & path ) ) ) && self . excluded_paths . iter ( ) . all ( | p | ! p . matches_prefix ( & path ) ) } ) }
Returns true if the given directory may contain matching paths.
Returns true if the given directory may contain matching paths .
&self
path
&Path
&self
path
&Path