pub struct Metadata { /* private fields */ }Expand description
Implementations§
Source§impl Metadata
impl Metadata
pub fn dev(&self) -> dev_t
pub fn rdev(&self) -> dev_t
pub fn inode(&self) -> ino_t
pub fn nlink(&self) -> u64
Sourcepub fn size(&self) -> u64
pub fn size(&self) -> u64
The size of the filesystem node. Note that this size is not recursive for directories; it will most likely be equal to 4096 bytes.
Sourcepub fn is_dir(&self) -> bool
pub fn is_dir(&self) -> bool
Returns true if this references a directory. This should always return true if you got
the Metadata object from Dir::fstat.
Sourcepub fn is_file(&self) -> bool
pub fn is_file(&self) -> bool
Returns true if this references a directory. This should always return false if you got
the Metadata object from Dir::fstat.
Sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
Returns true if this references a directory. This should always return false if you got
the Metadata object from Dir::fstat.
Sourcepub fn accessed(&self) -> SystemTime
pub fn accessed(&self) -> SystemTime
Last-accessed time, also named atime.
Sourcepub fn modified(&self) -> SystemTime
pub fn modified(&self) -> SystemTime
Last-modified time, also named mtime.
Sourcepub fn created(&self) -> SystemTime
pub fn created(&self) -> SystemTime
Last-changed time, also named ctime.
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