Trait genfs::DirEntry [] [src]

pub trait DirEntry {
    type Path: ?Sized;
    type PathOwned;
    type Metadata;
    type FileType;
    type Error;
    fn path(&self) -> Self::PathOwned;
fn metadata(&self) -> Result<Self::Metadata, Self::Error>;
fn file_type(&self) -> Result<Self::FileType, Self::Error>;
fn file_name(&self) -> &Self::Path; }

Entries returned by the Dir iterator.

An instance of DirEntry represents an entry inside of a directory on the filesystem. Each entry can be inspected via methods to learn about the full path or possibly other metadata through per-platform extension traits.

Associated Types

The borrowed path slice that represents a relative or absolute path on the filesystem.

The owned path that represents a relative or absolute path on the filesystem.

The type that represents a files metadata on the filesystem.

The type that represents the union of all possible filetypes.

The type that represents the set of all errors that can occur during reading or writing.

Required Methods

Returns the full path to the file that this entry represents.

The full path is created by joining the original path to read_dir with the filename of this entry.

Return the metadata for the file that this entry points at.

This function will not traverse symlinks if this entry points at a symlink.

Return the file type for the file that this entry points at.

This function will not traverse symlinks if this entry points at a symlink.

Returns the bare file name of this directory entry without any other leading path component.

Implementors