[][src]Struct sprint_dir::DirEntry

pub struct DirEntry { /* fields omitted */ }

Describes a file that was found.

All parents of this entry have already been yielded before.

Implementations

impl DirEntry[src]

pub fn path(&self) -> &Path[src]

Inspect the path of this entry.

pub fn metadata(&self) -> Result<Metadata>[src]

Read the full meta data.

pub fn into_path(self) -> PathBuf[src]

Convert the entry into a path

Potentially more efficient than as_path().to_owned().

pub fn file_type(&self) -> FileType[src]

pub fn file_name(&self) -> &OsStr[src]

Return the filename of this entry.

pub fn depth(&self) -> usize[src]

The depth at which this entry is in the directory tree.

When iterating items in depth-first order and following symbolic links then this is not necessarily the smallest depth at which it might appear.

Trait Implementations

impl Clone for DirEntry[src]

impl Debug for DirEntry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.