[M] Move ReturnPath to Generator

This commit is contained in:
Azalea Gui
2023-02-23 11:51:20 -05:00
parent 732b289ca2
commit 57d2b1946a
2 changed files with 7 additions and 8 deletions
+7
View File
@@ -1,6 +1,7 @@
use std::os::unix::fs::MetadataExt;
use pathdiff::diff_paths;
use std::path::{PathBuf};
use serde::{de, Deserialize, ser, Serialize};
const DOT_PATH: &str = ".meow_index";
@@ -16,6 +17,12 @@ pub fn generate_thumb(base: PathBuf, file: PathBuf) -> Result<(), String>
// Thumbnail already up to date
(Ok(tm), Ok(fm)) => if tm.mtime() >= fm.mtime() { return Ok(()) },
_ => {}
#[derive(Serialize, Deserialize)]
pub struct ReturnPath {
pub(crate) name: String,
pub(crate) file_type: String,
pub(crate) mtime: i64
}
}
}