(path: &Path)
| 4434 | } |
| 4435 | |
| 4436 | async 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 | |
| 4446 | async fn write_private_file(path: &Path, bytes: Vec<u8>) -> Result<(), std::io::Error> { |
| 4447 | tokio::fs::write(path, bytes).await?; |
no test coverage detected