convert root path
(&self)
| 27 | impl Storage { |
| 28 | /// convert root path |
| 29 | pub fn root(&self) -> Result<String> { |
| 30 | let home = dirs::home_dir() |
| 31 | .ok_or(Error::NoneError)? |
| 32 | .to_string_lossy() |
| 33 | .to_string(); |
| 34 | let path = self.root.replace('~', &home); |
| 35 | Ok(path) |
| 36 | } |
| 37 | |
| 38 | /// get cache path |
| 39 | pub fn cache(&self) -> Result<String> { |