+fn get_last_backup_datetime(backup_path: &str) -> Option<SystemTime> {\r
+ let mut times =\r
+ fs::read_dir(backup_path).ok()?.filter_map(\r
+ |e| {\r
+ let dir = e.ok()?;\r
+ if dir.path().is_file() { Some(dir.metadata().ok()?.created().ok()?) } else { None }\r
+ }\r
+ )\r
+ .collect::<Vec<SystemTime>>();\r
+\r
+ times.sort();\r