(&mut self, name: &str, ext: Option<&str>, path: &Utf8Path)
| 57 | } |
| 58 | |
| 59 | pub fn add_path(&mut self, name: &str, ext: Option<&str>, path: &Utf8Path) { |
| 60 | self.add(name, |zipper| { |
| 61 | if let Some(ext) = ext { |
| 62 | zipper.copy_from_fs(path, format!("{name}.{ext}").as_ref()) |
| 63 | } else { |
| 64 | zipper.copy_from_fs(path, name.as_ref()) |
| 65 | } |
| 66 | }); |
| 67 | } |
| 68 | |
| 69 | pub fn add_cmd(&mut self, name: &str, ext: &str, mut cmd: diva::Command) { |
| 70 | self.add(name, |zipper| { |
no test coverage detected