fn visit_entry<'s, 'w, F>(
        &'s self,
        entry: Entry,
        scope: &Scope<'w>,
        level: usize,
        state: &'w WalkState<F>,
    ) where
        F: Fn(Path) + Sync + Send,
        's: 'w,
    {
        // For progress reporting
        (self.on_visit)(&entry.path);

        // Skip hidden files
        if self.skip_hidden {
            if let Some(name) = entry.path.file_name_cstr() {
                if name.to_string_lossy().starts_with('.') {
                    return;
                }
            }
        }

        // Skip already visited paths. We're checking only when follow_links is true,
        // because inserting into a shared hash set is costly.
        if self.follow_links && !state.visited.insert(entry.path.hash128()) {
            return;
        }

        match entry.tpe {
            EntryType::File => self.visit_file(entry.path, state),
            EntryType::Dir => self.visit_dir(entry.path, scope, level, state),
            EntryType::SymLink => self.visit_link(&entry.path, scope, level, state),
            EntryType::Other => {}
        }
    }
/// Visits a path that was already converted to an `Entry` so the entry type is known.
/// Faster than `visit_path` because it doesn't need to call `stat` internally.
Visits a path that was already converted to an `Entry` so the entry type is known.
Faster than `visit_path` because it doesn't need to call `stat` internally.
Visits a path that was already converted to an ` Entry ` so the entry type is known . Faster than ` visit_path ` because it doesn ' t need to call ` stat ` internally .
fn visit_entry<'s, 'w, F>(
        &'s self,
        entry: Entry,
        scope: &Scope<'w>,
        level: usize,
        state: &'w WalkState<F>,
    ) where
        F: Fn(Path) + Sync + Send,
        's: 'w,
    {
        // For progress reporting
        (self.on_visit)(&entry.path);
        // Skip hidden files
        if self.skip_hidden {
            if let Some(name) = entry.path.file_name_cstr() {
                if name.to_string_lossy().starts_with('.') {
                    return;
                }
            }
        }
        // Skip already visited paths. We're checking only when follow_links is true,
        // because inserting into a shared hash set is costly.
        if self.follow_links && !state.visited.insert(entry.path.hash128()) {
            return;
        }
        match entry.tpe {
            EntryType::File => self.visit_file(entry.path, state),
            EntryType::Dir => self.visit_dir(entry.path, scope, level, state),
            EntryType::SymLink => self.visit_link(&entry.path, scope, level, state),
            EntryType::Other => {}
        }
    }
fn visit_entry < ' s , ' w , F > ( & ' s self , entry : Entry , scope : & Scope < ' w > , level : usize , state : & ' w WalkState < F > , ) where F : Fn ( Path ) + Sync + Send , ' s : ' w , { // For progress reporting ( self . on_visit ) ( & entry . path ) ; // Skip hidden files if self . skip_hidden { if let Some ( name ) = entry . path . file_name_cstr ( ) { if name . to_string_lossy ( ) . starts_with ( '.' ) { return ; } } } // Skip already visited paths. We're checking only when follow_links is true, // because inserting into a shared hash set is costly. if self . follow_links && ! state . visited . insert ( entry . path . hash128 ( ) ) { return ; } match entry . tpe { EntryType :: File => self . visit_file ( entry . path , state ) , EntryType :: Dir => self . visit_dir ( entry . path , scope , level , state ) , EntryType :: SymLink => self . visit_link ( & entry . path , scope , level , state ) , EntryType :: Other => { } } }
Visits a path that was already converted to an `Entry` so the entry type is known.
Visits a path that was already converted to an ` Entry ` so the entry type is known .
&'s self
entry
Entry
scope
&Scope<'w>
level
usize
state
&'w WalkState<F>
&'s self
entry
Entry
scope
&Scope<'w>
level
usize
state
&'w WalkState<F>