summaryrefslogtreecommitdiff
path: root/src/entry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/entry.rs')
-rw-r--r--src/entry.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/entry.rs b/src/entry.rs
index 72eeb7e..1b6b577 100644
--- a/src/entry.rs
+++ b/src/entry.rs
@@ -1,6 +1,9 @@
-use std::path::{Path, PathBuf};
use crate::*;
+use std::path::{Path, PathBuf};
+use std::time::SystemTime;
+
+
#[derive(PartialEq)]
pub enum EntryType {
File,
@@ -17,6 +20,8 @@ pub struct Entry {
pub path: PathBuf,
/// The file path as originally presented to the [Entry] constructor.
pub original_path: PathBuf,
+ /// Not available on all platforms.
+ pub last_modified: Option<SystemTime>,
}
impl Entry {
@@ -51,6 +56,7 @@ impl Entry {
path: canonical_path,
original_path: path.to_path_buf(),
is_symlink: metadata.is_symlink(),
+ last_modified: metadata.modified().ok(),
})
}