MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / copy_scripts

Function copy_scripts

cli/src/build.rs:187–199  ·  view source on GitHub ↗

Copy each `.py` preserving its path under the project root.

(scripts: &[PathBuf], project: &Path, out_dir: &Path)

Source from the content-addressed store, hash-verified

185
186/// Copy each `.py` preserving its path under the project root.
187fn copy_scripts(scripts: &[PathBuf], project: &Path, out_dir: &Path) -> Result<usize> {
188 let mut count = 0usize;
189 for s in scripts {
190 let rel = s.strip_prefix(project).unwrap_or(s);
191 let dest = out_dir.join(rel);
192 if let Some(p) = dest.parent() {
193 fs::create_dir_all(p)?;
194 }
195 fs::copy(s, &dest)?;
196 count += 1;
197 }
198 Ok(count)
199}
200
201/// Overlay vendored entries on top of the user's manifest; vendored paths win.
202fn rewrite_manifest(

Callers 1

runFunction · 0.85

Calls 1

copyFunction · 0.50

Tested by

no test coverage detected