pub trait StatExt {
// Required methods
fn atime(&self) -> i64;
fn mtime(&self) -> i64;
fn ctime(&self) -> i64;
}
Available on crate feature
fs
only.Expand description
Extension trait for accessing timestamp fields of Stat
.
Rustix’s Stat
type on some platforms has unsigned st_mtime
,
st_atime
, and st_ctime
fields. This is incorrect, as Unix defines
these fields to be signed, with negative values representing dates before
the Unix epoch. Until the next semver bump, these unsigned fields are
deprecated, and this trait provides accessors which return their values
as signed integers.