Struct rsfs::disk::DirEntry
[−]
[src]
pub struct DirEntry(_);
Entries returned by the ReadDir
iterator.
An instance of DirEntry
implements rsfs::DirEntry
and represents an entry inside a
directory on the in-memory filesystem. This struct is a single element tuple containing a
std::fs::DirEntry
.
Examples
let fs = rsfs::disk::FS; for entry in fs.read_dir(".")? { let entry = entry?; println!("{:?}: {:?}", entry.path(), entry.metadata()?.permissions()); }
Trait Implementations
impl Debug for DirEntry
[src]
impl DirEntry for DirEntry
[src]
type Metadata = Metadata
The Metadata
type in the same module implementing this trait.
type FileType = FileType
The FileType
type in the same module implementing this trait.
fn path(&self) -> PathBuf
Returns the full path to the file or directory this entry represents. Read more
fn metadata(&self) -> Result<Self::Metadata>
Returns metadata for the file this entry represents. Read more
fn file_type(&self) -> Result<Self::FileType>
Returns the file type for what this entry points at. Read more
fn file_name(&self) -> OsString
Returns the base name of the file or directory this entry represents. Read more