pub struct InodeMetadata { /* private fields */ }
Expand description
The metadata of an inode.
Implementations§
Source§impl InodeMetadata
impl InodeMetadata
Sourcepub const fn new(mode_without_type: u32) -> Self
pub const fn new(mode_without_type: u32) -> Self
Create a default metadata with given file mode.
Sourcepub fn uid(&mut self, uid: u32) -> &mut Self
pub fn uid(&mut self, uid: u32) -> &mut Self
Set the owner numeric id.
If unset, it defaults to 0
(root).
Sourcepub fn gid(&mut self, gid: u32) -> &mut Self
pub fn gid(&mut self, gid: u32) -> &mut Self
Set the owner group numeric id.
If unset, it defaults to 0
(root).
Sourcepub fn mtime(&mut self, timestamp: SystemTime) -> &mut Self
pub fn mtime(&mut self, timestamp: SystemTime) -> &mut Self
Set the modification time (mtime).
If unset, it defaults to SystemTime::UNIX_EPOCH
.
Sourcepub fn atime(&mut self, timestamp: SystemTime) -> &mut Self
pub fn atime(&mut self, timestamp: SystemTime) -> &mut Self
Set the access time (atime).
If unset, it defaults to SystemTime::UNIX_EPOCH
.
If Config::mtime_only
is set, this value is ignored.
Sourcepub fn ctime(&mut self, timestamp: SystemTime) -> &mut Self
pub fn ctime(&mut self, timestamp: SystemTime) -> &mut Self
Set the change time (ctime).
If unset, it defaults to SystemTime::UNIX_EPOCH
.
If Config::mtime_only
is set, this value is ignored.
Trait Implementations§
Source§impl Clone for InodeMetadata
impl Clone for InodeMetadata
Source§fn clone(&self) -> InodeMetadata
fn clone(&self) -> InodeMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InodeMetadata
impl Debug for InodeMetadata
Auto Trait Implementations§
impl Freeze for InodeMetadata
impl RefUnwindSafe for InodeMetadata
impl Send for InodeMetadata
impl Sync for InodeMetadata
impl Unpin for InodeMetadata
impl UnwindSafe for InodeMetadata
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