MCPcopy Create free account
hub / github.com/dfinity/orbit / read_file_from_local_bin

Function read_file_from_local_bin

tests/integration/src/setup.rs:279–288  ·  view source on GitHub ↗
(file_name: &str)

Source from the content-addressed store, hash-verified

277}
278
279fn read_file_from_local_bin(file_name: &str) -> Vec<u8> {
280 let mut file_path = local_bin();
281 file_path.push(file_name);
282
283 let mut file = File::open(&file_path)
284 .unwrap_or_else(|_| panic!("Failed to open file: {}", file_path.to_str().unwrap()));
285 let mut bytes = Vec::new();
286 file.read_to_end(&mut bytes).expect("Failed to read file");
287 bytes
288}

Callers 1

get_canister_wasmFunction · 0.85

Calls 2

local_binFunction · 0.85
openFunction · 0.85

Tested by

no test coverage detected