(&self, hash: String)
| 21 | } |
| 22 | |
| 23 | pub fn get(&self, hash: String) -> Result<PathBuf> { |
| 24 | let mut path = self.cache_dir.clone(); |
| 25 | path.push(hash); |
| 26 | if !path.exists() { |
| 27 | fs::create_dir(&path).chain_err(|| "Unable to create script cache dir")?; |
| 28 | } |
| 29 | Ok(path) |
| 30 | } |
| 31 | } |