pub struct DirectoryInspection {
pub path: PathBuf,
pub exists: bool,
pub is_directory: bool,
pub is_symlink: bool,
pub is_readable: Option<bool>,
pub metadata: Option<MetadataSummary>,
}Expand description
Result of inspecting a path as a potential directory.
§Symlink semantics
Path::is_dirfollows symlinks.symlink_metadatainspects the link itself.metadatafollows symlinks.- Broken symlinks are not directories.
- Permission errors may surface as
exists: falseonly in convenience booleans; preferinspect_directory/require_directoryfor errors.
Fields§
§path: PathBufPath that was inspected.
exists: boolWhether the path exists (symlink target may not, if inspecting a link).
is_directory: boolWhether the path is a directory (symlink-to-dir counts when following).
is_symlink: boolWhether the path itself is a symbolic link.
is_readable: Option<bool>Best-effort readability probe (None if not checked / not applicable).
metadata: Option<MetadataSummary>Optional metadata summary.
Trait Implementations§
Source§impl Clone for DirectoryInspection
impl Clone for DirectoryInspection
Source§fn clone(&self) -> DirectoryInspection
fn clone(&self) -> DirectoryInspection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectoryInspection
impl Debug for DirectoryInspection
impl Eq for DirectoryInspection
Source§impl PartialEq for DirectoryInspection
impl PartialEq for DirectoryInspection
impl StructuralPartialEq for DirectoryInspection
Auto Trait Implementations§
impl Freeze for DirectoryInspection
impl RefUnwindSafe for DirectoryInspection
impl Send for DirectoryInspection
impl Sync for DirectoryInspection
impl Unpin for DirectoryInspection
impl UnsafeUnpin for DirectoryInspection
impl UnwindSafe for DirectoryInspection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more