Skip to main content

Entry

Struct Entry 

Source
pub struct Entry {
    pub depth: usize,
    pub file_name: OsString,
    pub file_type: FileType,
    pub metadata: Result<Metadata>,
    pub parent_path: Arc<Path>,
    pub directory_id: Option<DirectoryId>,
    pub parent_directory_id: Option<DirectoryId>,
}
Expand description

A filesystem entry produced by walk.

Fields§

§depth: usize

Distance from the walk root: 0 for the root, 1 for its children, and so on.

§file_name: OsString

File name relative to parent_path.

§file_type: FileType

Filesystem entry type without following symbolic links.

§metadata: Result<Metadata>

Entry metadata, or the error encountered while reading it.

§parent_path: Arc<Path>

Path containing this entry.

§directory_id: Option<DirectoryId>

Dense identifier of this directory within the current walk, or None for non-directories.

§parent_directory_id: Option<DirectoryId>

Dense identifier of the directory containing this entry, or None for a walk root.

Implementations§

Source§

impl Entry

Source

pub fn path(&self) -> PathBuf

Return the full path to this entry.

Source

pub fn from_path(path: &Path, _options: Options) -> Result<Self>

Create an entry from a filesystem path.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Entry

§

impl !UnwindSafe for Entry

§

impl Freeze for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnsafeUnpin for Entry

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.