MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / default_dest

Method default_dest

atomic-cli/src/commands/sandbox.rs:99–106  ·  view source on GitHub ↗
(repo_root: &std::path::Path, name: &str)

Source from the content-addressed store, hash-verified

97
98impl Create {
99 fn default_dest(repo_root: &std::path::Path, name: &str) -> PathBuf {
100 let repo_name = repo_root
101 .file_name()
102 .map(|s| s.to_string_lossy().into_owned())
103 .unwrap_or_else(|| "repo".to_string());
104 let parent = repo_root.parent().unwrap_or(repo_root);
105 parent.join(format!("{repo_name}-sandboxes")).join(name)
106 }
107}
108
109impl Command for Create {

Callers

nothing calls this directly

Calls 2

file_nameMethod · 0.80
parentMethod · 0.80

Tested by

no test coverage detected