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

Function slug_from_rel

perro_website/build.rs:356–369  ·  view source on GitHub ↗
(rel: &Path)

Source from the content-addressed store, hash-verified

354 let src_path = entry?.path();
355 let file_name = src_path
356 .file_name()
357 .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "source has no file name"))?;
358 let dst_path = dst.join(file_name);
359 if src_path.is_dir() {
360 fs::create_dir_all(&dst_path)?;
361 copy_dir(&src_path, &dst_path)?;
362 } else {
363 fs::copy(&src_path, &dst_path)?;
364 }
365 }
366 Ok(())
367}
368
369fn collect_markdown(
370 collection: &str,
371 root: &Path,
372 dir: &Path,

Callers 1

collect_markdownFunction · 0.85

Calls 2

joinMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected