Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/internal/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unresolved intra-doc link (rustdoc warns no item named \created` in scope); [Entry::created]` resolves.

/// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: [Entry::modified].

/// file.
pub fn modified_raw(&self) -> u64 {
self.modified_time.raw_value()
}
}

impl fmt::Debug for Entry {
Expand Down
5 changes: 5 additions & 0 deletions src/internal/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<R: Read>(reader: &mut R) -> io::Result<Timestamp> {
Ok(Timestamp(reader.read_le_u64()?))
}
Expand Down