mirror of
git://git.proxmox.com/git/pxar.git
synced 2025-02-03 21:47:00 +03:00
convenience method to get mtime as std Duration
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
8eb622dd0e
commit
6da548dd11
@ -156,6 +156,14 @@ impl Entry {
|
||||
}
|
||||
}
|
||||
|
||||
/// Convenience accessor methods.
|
||||
impl Entry {
|
||||
/// Get the mtime as duration since the epoch.
|
||||
pub fn mtime_as_duration(&self) -> std::time::Duration {
|
||||
std::time::Duration::from_nanos(self.mtime)
|
||||
}
|
||||
}
|
||||
|
||||
/// Convenience methods.
|
||||
impl Entry {
|
||||
/// Check whether this is a directory.
|
||||
|
Loading…
x
Reference in New Issue
Block a user