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
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirEntry
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl UnwindSafe for DirEntry
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more