MCPcopy Index your code
hub / github.com/clearloop/leetcode-cli / scripts

Method scripts

src/config/storage.rs:61–73  ·  view source on GitHub ↗

get scripts path

(mut self)

Source from the content-addressed store, hash-verified

59
60 /// get scripts path
61 pub fn scripts(mut self) -> Result<String> {
62 let root = &self.root()?;
63 if self.scripts.is_none() {
64 self.scripts = Some("scripts".into());
65 }
66
67 let p = PathBuf::from(root).join(self.scripts.ok_or(Error::NoneError)?);
68 if !PathBuf::from(&p).exists() {
69 std::fs::create_dir(&p)?
70 }
71
72 Ok(p.to_string_lossy().to_string())
73 }
74}

Callers

nothing calls this directly

Calls 1

rootMethod · 0.45

Tested by

no test coverage detected