pub struct Stat {
pub mtime: Time,
pub ctime: Time,
pub dev: u32,
pub ino: u32,
pub uid: u32,
pub gid: u32,
pub size: u32,
}
Expand description
An entry’s filesystem stat information.
Fields§
§mtime: Time
Modification time
ctime: Time
Creation time
dev: u32
Device number
ino: u32
Inode number
uid: u32
User id of the owner
gid: u32
Group id of the owning group
size: u32
The size of bytes on disk. Capped to u32 so files bigger than that will need thorough additional checking
Implementations§
Source§impl Stat
impl Stat
Sourcepub fn is_racy(&self, timestamp: FileTime, _: Options) -> bool
pub fn is_racy(&self, timestamp: FileTime, _: Options) -> bool
Detect whether this stat entry is racy if stored in a file index with timestamp
.
An index entry is considered racy if it’s mtime
is larger or equal to the index timestamp
.
The index timestamp
marks the point in time before which we definitely resolved the racy git problem
for all index entries so any index entries that changed afterwards will need to be examined for
changes by actually reading the file from disk at least once.
Sourcepub fn matches(&self, other: &Self, _: Options) -> bool
pub fn matches(&self, other: &Self, _: Options) -> bool
Compares the stat information of two index entries.
Intuitively this is basically equivalent to self == other
.
However there a lot of nobs in git that tweak whether certain stat information is used when checking
equality, see Options
.
This function respects those options while performing the stat comparison and may therefore ignore some fields.