pub struct Metadata { /* private fields */ }
Expand description
Metadata information about a file.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
Return true if this metadata is for a symlink.
Sourcepub fn mode(&self) -> u16
pub fn mode(&self) -> u16
Get the file’s UNIX permission bits.
Diagram of the returned value’s bits:
top four bits are always zero
│
│ set uid, set gid, sticky bit
│ │
│ │ owner read/write/execute
│ │ │
│ │ │ group read/write/execute
│ │ │ │
│ │ │ │ other read/write/execute
│ │ │ │ │
(msb) 0000xxxuuugggooo (lsb)
See st_mode
in inode(7) for more details.
Trait Implementations§
Source§impl Ord for Metadata
impl Ord for Metadata
Source§impl PartialOrd for Metadata
impl PartialOrd for Metadata
impl Eq for Metadata
impl StructuralPartialEq for Metadata
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