MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / read_to_str

Function read_to_str

src/fs/mod.rs:373–377  ·  view source on GitHub ↗

Read to string

(path: &str)

Source from the content-addressed store, hash-verified

371
372// Read to string
373pub fn read_to_str(path: &str) -> Result<String, ()>
374{
375 let buffer = read_to_bytes(path)?;
376 Ok(String::from_utf8_lossy(&buffer).to_string())
377}
378
379
380// Reopen

Callers 2

mainFunction · 0.85
loadMethod · 0.85

Calls 1

read_to_bytesFunction · 0.85

Tested by

no test coverage detected