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.