diff --git a/src/internal/entry.rs b/src/internal/entry.rs index 83a1eeb..3d21e45 100644 --- a/src/internal/entry.rs +++ b/src/internal/entry.rs @@ -89,11 +89,23 @@ impl Entry { self.creation_time.to_system_time() } + /// Returns the raw FILETIME value of [`created`], as it is stored in the + /// file. + pub fn created_raw(&self) -> u64 { + self.creation_time.raw_value() + } + /// Returns the time when the object that this entry represents was last /// modified. pub fn modified(&self) -> SystemTime { self.modified_time.to_system_time() } + + /// Returns the raw FILETIME value of [`modified`], as it is stored in the + /// file. + pub fn modified_raw(&self) -> u64 { + self.modified_time.raw_value() + } } impl fmt::Debug for Entry { diff --git a/src/internal/timestamp.rs b/src/internal/timestamp.rs index 4c24147..c61eade 100644 --- a/src/internal/timestamp.rs +++ b/src/internal/timestamp.rs @@ -36,6 +36,11 @@ impl Timestamp { system_time_from_timestamp(self.0) } + /// Returns the raw FILETIME value. + pub fn raw_value(self) -> u64 { + self.0 + } + pub fn read_from(reader: &mut R) -> io::Result { Ok(Timestamp(reader.read_le_u64()?)) }