pub struct Metadata(/* private fields */);
Available on non-Windows only.
Expand description
A structure to partially mirror std::fs::Metadata
.
Implementations§
source§impl Metadata
impl Metadata
Access
sourcepub fn modified(&self) -> Option<SystemTime>
pub fn modified(&self) -> Option<SystemTime>
Return the time at which the underlying file was modified.
sourcepub fn created(&self) -> Option<SystemTime>
pub fn created(&self) -> Option<SystemTime>
Return the time at which the underlying file was created.
Note that this differs from std::fs::Metadata::created()
which would return
the inode birth time, which is notably different to what git
does.
sourcepub fn is_executable(&self) -> bool
pub fn is_executable(&self) -> bool
Return true
if the file’s executable bit is set, or false
on windows.
sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
Return true
if the file’s is a symbolic link.
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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