pub struct Metadata { /* private fields */ }Expand description
File metadata such as timestamps and size, abstracted across the native and Node.js file system backends.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn created(&self) -> Option<u64>
pub fn created(&self) -> Option<u64>
Creation time as seconds since the Unix epoch, if available.
Sourcepub fn modified(&self) -> Option<u64>
pub fn modified(&self) -> Option<u64>
Last modification time as seconds since the Unix epoch, if available.
Sourcepub fn accessed(&self) -> Option<u64>
pub fn accessed(&self) -> Option<u64>
Last access time as seconds since the Unix epoch, if available.
Sourcepub fn is_empty(&self) -> Option<bool>
pub fn is_empty(&self) -> Option<bool>
Returns Some(true) when the file is known to be empty, mirroring Metadata::len.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin 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