use std::fs::{copy, create_dir_all};
use std::path::Path;
-use crate::file_handler::{File, FileHandlerStrategy, FileType};
+use crate::file_handler::{File, FileType, Strategy as FileHandlerStrategy};
impl Strategy {
- fn handle(&self, source: &Path, destination: &Path, file: &File) {
+ fn handle(source: &Path, destination: &Path, file: &File) {
let relative_path = file.path.strip_prefix(source).unwrap();
let complete_destination = destination.join(relative_path);
let destination_parent = complete_destination.parent().unwrap();
}
fn handle_html(&self, source: &Path, destination: &Path, file: &File, _l: &str) {
- self.handle(source, destination, file)
+ Strategy::handle(source, destination, file);
}
fn handle_gemini(&self, source: &Path, destination: &Path, file: &File) {
- self.handle(source, destination, file)
+ Strategy::handle(source, destination, file);
}
}