pub fn lookup(&self, path: &Path, _entries: &EntryMap) -> Option<EntryKey> {
        let mut parent = self.root;
        let mut components = into_components(path);
        // remove the first component because it will always be the root
        components.remove(0);

        // If the path has no components there is nothing to look up.
        if components.is_empty() {
            return None;
        }

        let last_component = components.pop()?;

        for component in components {
            parent = self.follow_links(parent, _entries).and_then(|e| {
                if let Some(e) = _entries.get(e) {
                    e.children()?
                        .get(&component)
                        .and_then(|entry| self.follow_links(*entry, _entries))
                } else {
                    info!("Failed to find entry on lookup");
                    None
                }
            })?;
        }

        _entries
            .get(parent)?
            .children()?
            .get(&last_component)
            .copied()
    }
/// Returns the entry that represents the supplied path.
/// When the path is not represented and therefore has no entry then `None` is return.
Returns the entry that represents the supplied path.
When the path is not represented and therefore has no entry then `None` is return.
Returns the entry that represents the supplied path . When the path is not represented and therefore has no entry then ` None ` is return .
pub fn lookup(&self, path: &Path, _entries: &EntryMap) -> Option<EntryKey> {
        let mut parent = self.root;
        let mut components = into_components(path);
        // remove the first component because it will always be the root
        components.remove(0);
        // If the path has no components there is nothing to look up.
        if components.is_empty() {
            return None;
        }
        let last_component = components.pop()?;
        for component in components {
            parent = self.follow_links(parent, _entries).and_then(|e| {
                if let Some(e) = _entries.get(e) {
                    e.children()?
                        .get(&component)
                        .and_then(|entry| self.follow_links(*entry, _entries))
                } else {
                    info!("Failed to find entry on lookup");
                    None
                }
            })?;
        }
        _entries
            .get(parent)?
            .children()?
            .get(&last_component)
            .copied()
    }
pub fn lookup ( & self , path : & Path , _entries : & EntryMap ) -> Option < EntryKey > { let mut parent = self . root ; let mut components = into_components ( path ) ; // remove the first component because it will always be the root components . remove ( 0 ) ; // If the path has no components there is nothing to look up. if components . is_empty ( ) { return None ; } let last_component = components . pop ( ) ? ; for component in components { parent = self . follow_links ( parent , _entries ) . and_then ( | e | { if let Some ( e ) = _entries . get ( e ) { e . children ( ) ? . get ( & component ) . and_then ( | entry | self . follow_links ( * entry , _entries ) ) } else { info ! ( " " ) ; None } } ) ? ; } _entries . get ( parent ) ? . children ( ) ? . get ( & last_component ) . copied ( ) }
Returns the entry that represents the supplied path.
Returns the entry that represents the supplied path .
&self
path
&Path
_entries
&EntryMap
&self
path
&Path
_entries
&EntryMap