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

Function writable_disk_path

perro_source/api_modules/perro_modules/src/zip.rs:51–60  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

49}
50
51pub fn write_files<P: ResPathSource>(path: P, files: &[(&str, &str)]) -> io::Result<()> {
52 let path = writable_file_path(path.as_res_path_str())?;
53 if let Some(parent) = path.parent() {
54 std::fs::create_dir_all(parent)?;
55 }
56 let entries = files
57 .iter()
58 .map(|(source, name)| {
59 let source = readable_disk_path(source)?;
60 Ok(ZipEntry::new(source, *name))
61 })
62 .collect::<io::Result<Vec<_>>>()?;
63 perro_io::write_zip_file(path, &entries)

Callers 2

extract_allFunction · 0.85
writable_file_pathFunction · 0.85

Calls 2

validate_write_pathFunction · 0.70
resolve_pathFunction · 0.50

Tested by

no test coverage detected