[−][src]Struct jwalk::DirEntry
Representation of a file or directory.
This representation does not wrap a std::fs::DirEntry. Instead it copies
file_name, file_type, and optionaly metadata out of the underlying
std::fs::DirEntry. This allows it to quickly drop the underlying file
descriptor.
Fields
depth: usizeDepth of this entry relative to the root directory where the walk started.
file_name: OsStringFile name of this entry without leading path component.
file_type: Result<FileType>File type result for the file/directory that this entry points at.
metadata: Option<Result<Metadata>>Metadata result for the file/directory that this entry points at. Defaults
to None. Filled in by the walk process when the
preload_metadata option
is set.
content_spec: Option<Arc<ReadDirSpec>>ReadDirSpec used for reading this entry's
content. This is automatically set for directory entries. The
process_entries callback
may set this field to None to skip reading the contents of this
particular directory.
content_error: Option<Error>If fs::read_dir generates an error when reading this entry's content
then that error is stored here.
parent_spec: Option<Arc<ReadDirSpec>>ReadDirSpec used by this entry's parent to
read this entry.
Methods
impl DirEntry[src]
pub fn path(&self) -> PathBuf[src]
Path to the file/directory represented by this entry.
The path is created by joining parent_path with file_name.
pub fn parent_path(&self) -> Option<&Path>[src]
Reference to the path of the directory containing this entry.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,