MCPcopy Create free account
hub / github.com/PerroEngine/Perro / resolve_content_root

Function resolve_content_root

perro_source/devtools/perro_cli/src/scaffold.rs:176–187  ·  view source on GitHub ↗
(project_dir: &Path, args: &[String])

Source from the content-addressed store, hash-verified

174}
175
176fn resolve_content_root(project_dir: &Path, args: &[String]) -> Result<PathBuf, String> {
177 if let Some(raw_dlc) = parse_flag_value(args, "--dlc") {
178 let dlc = validate_dlc_name(&raw_dlc)?;
179 return Ok(project_dir.join("dlcs").join(dlc));
180 }
181
182 let res_root = project_dir.join("res");
183 if !res_root.exists() {
184 return Err(format!("res directory not found at {}", res_root.display()));
185 }
186 Ok(res_root)
187}
188
189fn resolve_content_prefix(args: &[String]) -> Result<String, String> {
190 if let Some(raw_dlc) = parse_flag_value(args, "--dlc") {

Callers 4

new_script_commandFunction · 0.85
new_scene_commandFunction · 0.85
new_animation_commandFunction · 0.85
new_panimtree_commandFunction · 0.85

Calls 3

joinMethod · 0.80
parse_flag_valueFunction · 0.70
validate_dlc_nameFunction · 0.70

Tested by

no test coverage detected