MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / read_sandbox_request

Function read_sandbox_request

crates/openshell-driver-vm/src/driver.rs:4436–4444  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

4434}
4435
4436async fn read_sandbox_request(path: &Path) -> Result<Sandbox, std::io::Error> {
4437 let bytes = tokio::fs::read(path).await?;
4438 Sandbox::decode(bytes.as_slice()).map_err(|err| {
4439 std::io::Error::new(
4440 std::io::ErrorKind::InvalidData,
4441 format!("decode persisted sandbox request: {err}"),
4442 )
4443 })
4444}
4445
4446async fn write_private_file(path: &Path, bytes: Vec<u8>) -> Result<(), std::io::Error> {
4447 tokio::fs::write(path, bytes).await?;

Calls 1

as_sliceMethod · 0.80

Tested by

no test coverage detected