pub struct Metadata {}Expand description
POSIX-shaped attributes; plain data record everywhere.
Fields§
§ino: u64Stable, non-reused inode number.
file_type: FileTypeFile type.
mode: u32Full st_mode (type bits + permission bits).
nlink: u64Hard-link count.
uid: u32Owner uid.
gid: u32Owner gid.
size: u64Size in bytes.
block_size: u64Preferred I/O block size reported by the server.
blocks: u64Number of 512-byte blocks allocated.
rdev: u64Device id for char/block nodes; 0 otherwise.
atime: TimestampLast access time.
mtime: TimestampLast modification time.
ctime: TimestampLast status-change time.
btime: TimestampReserved creation time. Current servers report the epoch.
data_version: u64Reserved content-change counter. Current servers report zero; use mtime
for change detection.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
True if this is a symbolic link.
Sourcepub fn permissions(&self) -> u32
pub fn permissions(&self) -> u32
Permission bits only.
Sourcepub fn modified(&self) -> SystemTime
pub fn modified(&self) -> SystemTime
mtime as a SystemTime (Rust-only sugar).
Sourcepub fn accessed(&self) -> SystemTime
pub fn accessed(&self) -> SystemTime
atime as a SystemTime (Rust-only sugar).
Trait Implementations§
impl Copy for Metadata
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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