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

Function load_string

perro_source/api_modules/perro_modules/src/file.rs:22–25  ·  view source on GitHub ↗
(path: P)

Source from the content-addressed store, hash-verified

20}
21
22pub fn load_string<P: ResPathSource>(path: P) -> io::Result<String> {
23 let bytes = load_bytes(path)?;
24 String::from_utf8(bytes).map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))
25}
26
27pub fn save_bytes<P: ResPathSource>(path: P, data: &[u8]) -> io::Result<()> {
28 let path = path.as_res_path_str();

Callers

nothing calls this directly

Calls 1

load_bytesFunction · 0.70

Tested by

no test coverage detected