pub struct PinnedState {
pub len: u64,
pub modified_secs: u64,
pub modified_nanos: u32,
pub changed_secs: u64,
pub changed_nanos: u32,
pub inode: u64,
pub mode: u32,
}Expand description
What a present pinned file looked like: enough to notice it being written, replaced, or made executable, without reading it.
Length and modification time alone would miss a replacement of the same
length whose timestamp was preserved, and a chmod +x, which touches
neither. So the inode says whether it is the same file, the change time,
which the kernel sets on every write, rename and permission change and
which no program can set back, says whether it was touched, and the mode
says whether it can run. Windows has no change time or inode to offer
through the standard library; its creation time and attributes stand in.
Fields§
§len: u64Length in bytes.
modified_secs: u64Modification time, seconds since the Unix epoch.
modified_nanos: u32Modification time, nanoseconds past modified_secs.
changed_secs: u64Change time on Unix, creation time on Windows, seconds since the Unix epoch.
changed_nanos: u32Nanoseconds past changed_secs.
inode: u64The inode on Unix; zero on Windows.
mode: u32Permission bits on Unix, file attributes on Windows.
Trait Implementations§
Source§impl Clone for PinnedState
impl Clone for PinnedState
Source§fn clone(&self) -> PinnedState
fn clone(&self) -> PinnedState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more