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

Function save_bytes

perro_source/api_modules/perro_modules/src/file.rs:27–31  ·  view source on GitHub ↗
(path: P, data: &[u8])

Source from the content-addressed store, hash-verified

25}
26
27pub fn save_bytes<P: ResPathSource>(path: P, data: &[u8]) -> io::Result<()> {
28 let path = path.as_res_path_str();
29 validate_write_path(path)?;
30 save_asset(path, data)
31}
32
33pub fn save_string<P: ResPathSource>(path: P, data: &str) -> io::Result<()> {
34 save_bytes(path, data.as_bytes())

Callers 1

save_stringFunction · 0.70

Calls 3

save_assetFunction · 0.85
as_res_path_strMethod · 0.80
validate_write_pathFunction · 0.70

Tested by

no test coverage detected