pub fn index<R>(
        &self,
        inode: Arc<INode>,
        prefix: Vec<&str>,
        receiver: &mut R,
    ) -> Result<bool, ParsingError>
    where
        R: FnMut(&Parser<T>, Vec<&str>, Arc<DirEntry2>) -> Result<bool, ParsingError>,
    {
        let entries = self.entries_from_inode(&inode)?;
        for entry in entries {
            let entry_name = entry.name()?;
            if entry_name == "." || entry_name == ".." {
                continue;
            }
            let mut name = Vec::new();
            name.append(&mut prefix.clone());
            name.push(entry_name);
            if !receiver(self, name.clone(), entry.clone())? {
                return Ok(false);
            }
            if EntryType::from_u8(entry.e2d_type)? == EntryType::Directory {
                let inode = self.inode(entry.e2d_ino.get())?;
                if !self.index(inode, name, receiver)? {
                    return Ok(false);
                }
            }
        }

        Ok(true)
    }
/// Progress through the entire directory tree starting from the given INode.
///
/// If given the root directory INode, this will process through every directory entry in the
/// filesystem in a DFS manner.
///
/// Takes in a closure that will be called for each entry found.
/// Closure should return `Ok(true)` in order to continue the process, otherwise the process
/// will stop.
///
/// Returns Ok(true) if it has indexed its subtree successfully. Otherwise, if the receiver
/// chooses to cancel indexing early, an Ok(false) is returned and propagated up.
Progress through the entire directory tree starting from the given INode.
If given the root directory INode, this will process through every directory entry in the
filesystem in a DFS manner.

Takes in a closure that will be called for each entry found.
Closure should return `Ok(true)` in order to continue the process, otherwise the process
will stop.

Returns Ok(true) if it has indexed its subtree successfully. Otherwise, if the receiver
chooses to cancel indexing early, an Ok(false) is returned and propagated up.
Progress through the entire directory tree starting from the given INode . If given the root directory INode this will process through every directory entry in the filesystem in a DFS manner . Takes in a closure that will be called for each entry found . Closure should return ` Ok ( true ) ` in order to continue the process otherwise the process will stop . Returns Ok ( true ) if it has indexed its subtree successfully . Otherwise if the receiver chooses to cancel indexing early an Ok ( false ) is returned and propagated up .
pub fn index<R>(
        &self,
        inode: Arc<INode>,
        prefix: Vec<&str>,
        receiver: &mut R,
    ) -> Result<bool, ParsingError>
    where
        R: FnMut(&Parser<T>, Vec<&str>, Arc<DirEntry2>) -> Result<bool, ParsingError>,
    {
        let entries = self.entries_from_inode(&inode)?;
        for entry in entries {
            let entry_name = entry.name()?;
            if entry_name == "." || entry_name == ".." {
                continue;
            }
            let mut name = Vec::new();
            name.append(&mut prefix.clone());
            name.push(entry_name);
            if !receiver(self, name.clone(), entry.clone())? {
                return Ok(false);
            }
            if EntryType::from_u8(entry.e2d_type)? == EntryType::Directory {
                let inode = self.inode(entry.e2d_ino.get())?;
                if !self.index(inode, name, receiver)? {
                    return Ok(false);
                }
            }
        }
        Ok(true)
    }
pub fn index < R > ( & self , inode : Arc < INode > , prefix : Vec < & str > , receiver : & mut R , ) -> Result < bool , ParsingError > where R : FnMut ( & Parser < T > , Vec < & str > , Arc < DirEntry2 > ) -> Result < bool , ParsingError > , { let entries = self . entries_from_inode ( & inode ) ? ; for entry in entries { let entry_name = entry . name ( ) ? ; if entry_name == " " || entry_name == " " { continue ; } let mut name = Vec :: new ( ) ; name . append ( & mut prefix . clone ( ) ) ; name . push ( entry_name ) ; if ! receiver ( self , name . clone ( ) , entry . clone ( ) ) ? { return Ok ( false ) ; } if EntryType :: from_u8 ( entry . e2d_type ) ? == EntryType :: Directory { let inode = self . inode ( entry . e2d_ino . get ( ) ) ? ; if ! self . index ( inode , name , receiver ) ? { return Ok ( false ) ; } } } Ok ( true ) }
Progress through the entire directory tree starting from the given INode.
Progress through the entire directory tree starting from the given INode .
&self
inode
Arc<INode>
prefix
Vec<&str>
receiver
&mut R
&self
inode
Arc<INode>
prefix
Vec<&str>
receiver
&mut R