fn type_(&self) -> PathType {
        self.symlink_metadata()
            .map(|meta| {
                let is_symlink = meta.file_type().is_symlink();
                let is_dir = self.is_dir();
                match (is_symlink, is_dir) {
                    (true, true) => PathType::SymlinkDir,
                    (false, true) => PathType::Dir,
                    (true, false) => PathType::SymlinkFile,
                    (false, false) => PathType::File,
                }
            })
            .unwrap_or(PathType::File)
    }
/// Determine given path is a normal file/directory or a symlink.
Determine given path is a normal file/directory or a symlink.
Determine given path is a normal file / directory or a symlink .
fn type_(&self) -> PathType {
        self.symlink_metadata()
            .map(|meta| {
                let is_symlink = meta.file_type().is_symlink();
                let is_dir = self.is_dir();
                match (is_symlink, is_dir) {
                    (true, true) => PathType::SymlinkDir,
                    (false, true) => PathType::Dir,
                    (true, false) => PathType::SymlinkFile,
                    (false, false) => PathType::File,
                }
            })
            .unwrap_or(PathType::File)
    }
fn type_ ( & self ) -> PathType { self . symlink_metadata ( ) . map ( | meta | { let is_symlink = meta . file_type ( ) . is_symlink ( ) ; let is_dir = self . is_dir ( ) ; match ( is_symlink , is_dir ) { ( true , true ) => PathType :: SymlinkDir , ( false , true ) => PathType :: Dir , ( true , false ) => PathType :: SymlinkFile , ( false , false ) => PathType :: File , } } ) . unwrap_or ( PathType :: File ) }
Determine given path is a normal file/directory or a symlink.
Determine given path is a normal file / directory or a symlink .
&self
&self