/// Convert an inode number to a file path.
Convert an inode number to a file path.
Convert an inode number to a file path .
pub fn path_from_ino(&self, ino: Inode) -> Result<PathBuf> {
        if ino == ROOT_ID {
            return Ok(self.get_inode(ino, false)?.name().into());
        }
        let mut path = PathBuf::new();
        let mut cur_ino = ino;
        let mut inode;
        loop {
            inode = self.get_inode(cur_ino, false)?;
            let e: PathBuf = inode.name().into();
            path = e.join(path);
            if inode.ino() == ROOT_ID {
                break;
            } else {
                cur_ino = inode.parent();
            }
        }
        Ok(path)
    }
pub fn path_from_ino ( & self , ino : Inode ) -> Result < PathBuf > { if ino == ROOT_ID { return Ok ( self . get_inode ( ino , false ) ? . name ( ) . into ( ) ) ; } let mut path = PathBuf :: new ( ) ; let mut cur_ino = ino ; let mut inode ; loop { inode = self . get_inode ( cur_ino , false ) ? ; let e : PathBuf = inode . name ( ) . into ( ) ; path = e . join ( path ) ; if inode . ino ( ) == ROOT_ID { break ; } else { cur_ino = inode . parent ( ) ; } } Ok ( path ) }
Convert an inode number to a file path.
Convert an inode number to a file path .
&self
ino
Inode