diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-16 13:46:46 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-16 13:46:46 +0200 |
| commit | ea5297364f8a1b2c4e684140024b60a83b087b50 (patch) | |
| tree | 788cabbe2d660ec004009017eb793426d205cf8f /src/file_handler/mod.rs | |
| parent | 4fd89b808cabc8afb0d75b9700be1da96989c4b7 (diff) | |
Add static file copying
Diffstat (limited to 'src/file_handler/mod.rs')
| -rw-r--r-- | src/file_handler/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_handler/mod.rs b/src/file_handler/mod.rs index 53aaba9..64224ee 100644 --- a/src/file_handler/mod.rs +++ b/src/file_handler/mod.rs @@ -58,7 +58,7 @@ impl FileHandler { pub fn handle(&self, source: &PathBuf, destination: &PathBuf, file: &File) { for strategy in self.strategies.iter() { if strategy.can_handle(&file.file_type) { - return strategy.handle(file); + return strategy.handle(source, destination, file); } } } @@ -68,7 +68,7 @@ pub trait FileHandlerStrategy { fn is(&self, path: &PathBuf) -> bool; fn identify(&self) -> FileType; fn can_handle(&self, file_type: &FileType) -> bool; - fn handle(&self, file: &File); + fn handle(&self, source: &PathBuf, destination: &PathBuf, file: &File); } pub enum FileType { |