pub struct DirEntry { /* private fields */ }
Available on crate feature
tokio
only.Expand description
Entries returned by the ReadDir
stream.
This is a wrapper around tokio::fs::DirEntry
.
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 around tokio::fs::DirEntry::path
.
sourcepub fn file_name(&self) -> OsString
pub fn file_name(&self) -> OsString
Returns the bare file name of this directory entry without any other leading path component.
Wrapper around tokio::fs::DirEntry::file_name
.
sourcepub async fn metadata(&self) -> Result<Metadata>
pub async fn metadata(&self) -> Result<Metadata>
Returns the metadata for the file that this entry points at.
Wrapper around tokio::fs::DirEntry::metadata
.
sourcepub async fn file_type(&self) -> Result<FileType>
pub async fn file_type(&self) -> Result<FileType>
Returns the file type for the file that this entry points at.
Wrapper around tokio::fs::DirEntry::file_type
.
Trait Implementations§
Auto Trait Implementations§
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