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);
}
}
}
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 {