pub struct Metadata { /* private fields */ }
Expand description
Metadata information about a file.
See AsyncFd::metadata
and Stat
.
Implementations§
source§impl Metadata
impl Metadata
sourcepub const fn is_symlink(&self) -> bool
pub const fn is_symlink(&self) -> bool
Returns true
if this represents a symbolic link.
sourcepub const fn block_size(&self) -> u32
pub const fn block_size(&self) -> u32
The “preferred” block size for efficient filesystem I/O.
sourcepub const fn permissions(&self) -> Permissions
pub const fn permissions(&self) -> Permissions
Returns the permissions of the file this metadata is for.
sourcepub fn modified(&self) -> SystemTime
pub fn modified(&self) -> SystemTime
Returns the time this file was last modified.
sourcepub fn accessed(&self) -> SystemTime
pub fn accessed(&self) -> SystemTime
Returns the time this file was last accessed.
§Notes
It’s possible to disable keeping track of this access time, which makes this function return an invalid value.
sourcepub fn created(&self) -> SystemTime
pub fn created(&self) -> SystemTime
Returns the time this file was created.
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 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