Files
strafe-project/integration-testing/src/util.rs
2025-05-22 13:41:43 -07:00

8 lines
188 B
Rust

use std::io::Cursor;
use std::path::Path;
pub fn read_entire_file(path:impl AsRef<Path>)->Result<Cursor<Vec<u8>>,std::io::Error>{
let data=std::fs::read(path)?;
Ok(Cursor::new(data))
}