MCPcopy Index your code
hub / github.com/faern/rustscript / get

Method get

src/cache.rs:23–30  ·  view source on GitHub ↗
(&self, hash: String)

Source from the content-addressed store, hash-verified

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}

Callers 1

runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected