get cache path
(&self)
| 37 | |
| 38 | /// get cache path |
| 39 | pub fn cache(&self) -> Result<String> { |
| 40 | let root = PathBuf::from(self.root()?); |
| 41 | if !root.exists() { |
| 42 | info!("Generate cache dir at {:?}.", &root); |
| 43 | fs::DirBuilder::new().recursive(true).create(&root)?; |
| 44 | } |
| 45 | |
| 46 | Ok(root.join(CACHE).to_string_lossy().to_string()) |
| 47 | } |
| 48 | |
| 49 | /// get code path |
| 50 | pub fn code(&self) -> Result<String> { |