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