pub enum Entry {
File(Box<FileEntry>),
Directory(Box<DirectoryEntry>),
Symlink(Box<SymlinkEntry>),
}Variants§
Implementations§
Source§impl Entry
impl Entry
Sourcepub const fn name(&self) -> &str
pub const fn name(&self) -> &str
Returns the name of the entry.
This is the name of the file or directory, not the full path.
For example, if the entry is under path/to/file.txt, this will return file.txt.
Sourcepub const fn mode(&self) -> EntryMode
pub const fn mode(&self) -> EntryMode
Returns the mode of the entry. This also contains the file permissions of the entry.
Sourcepub const fn owner(&self) -> (u32, u32)
pub const fn owner(&self) -> (u32, u32)
Returns the owner of the entry. This is the user ID and group ID of the entry.
Sourcepub const fn mtime(&self) -> SystemTime
pub const fn mtime(&self) -> SystemTime
Returns the modification time of the entry. This is the time the entry was last modified.
pub const fn is_file(&self) -> bool
pub const fn is_directory(&self) -> bool
pub const fn is_symlink(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entry
impl !RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl !UnwindSafe for Entry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more