/// Funtion which returns String representing permissions and owner of selected entry.
Funtion which returns String representing permissions and owner of selected entry.
Funtion which returns String representing permissions and owner of selected entry .
pub fn permission_string(&self) -> Result<String> {
        let meta = self.path.metadata()?;
        let uid = meta.uid();
        let gid = meta.gid();
        let uid = get_user_by_uid(uid).unwrap();
        let gid = get_group_by_gid(gid).unwrap();
        let mut repr = String::with_capacity(10);
        if self.path.is_dir() {
            repr.push('d')
        } else {
            repr.push('-')
        }
        Ok(repr
            + &Permissions::from(meta.mode()).to_string()
            + &format!(" {}:{}", uid.name().to_str().unwrap(), gid.name().to_str().unwrap()))
    }
pub fn permission_string ( & self ) -> Result < String > { let meta = self . path . metadata ( ) ? ; let uid = meta . uid ( ) ; let gid = meta . gid ( ) ; let uid = get_user_by_uid ( uid ) . unwrap ( ) ; let gid = get_group_by_gid ( gid ) . unwrap ( ) ; let mut repr = String :: with_capacity ( 10 ) ; if self . path . is_dir ( ) { repr . push ( 'd' ) } else { repr . push ( '-' ) } Ok ( repr + & Permissions :: from ( meta . mode ( ) ) . to_string ( ) + & format ! ( " " uid name ( ) to_str ( ) unwrap ( ) gid name ( ) to_str ( ) unwrap ( ) ) ) }
Funtion which returns String representing permissions and owner of selected entry.
Funtion which returns String representing permissions and owner of selected entry .
&self