pub struct DirEntry { /* private fields */ }Expand description
Wrapper around std::fs::DirEntry which adds more
helpful information to all errors.
Implementations§
Source§impl DirEntry
impl DirEntry
Sourcepub fn path(&self) -> PathBuf
pub fn path(&self) -> PathBuf
Returns the full path to the file that this entry represents.
Wrapper for DirEntry::path.
Sourcepub fn metadata(&self) -> Result<Metadata>
pub fn metadata(&self) -> Result<Metadata>
Returns the metadata for the file that this entry points at.
Wrapper for DirEntry::metadata.
Sourcepub fn file_type(&self) -> Result<FileType>
pub fn file_type(&self) -> Result<FileType>
Returns the file type for the file that this entry points at.
Wrapper for DirEntry::file_type.
Sourcepub fn file_name(&self) -> OsString
pub fn file_name(&self) -> OsString
Returns the file name of this directory entry without any leading path component(s).
Wrapper for DirEntry::file_name.