Skip to main content

read_bytes

Function read_bytes 

Source
pub fn read_bytes(path: String) -> Result<Vec<u8>, String>
Expand description

Reads a file’s raw bytes. The total counterpart of the trapping readBytes builtin.

★ ONE IMPLEMENTATION AND ONE MESSAGE, so the tiers cannot drift. The interpreter and the AOT-Rust lowering both call THIS — the alternative was two std::fs::read calls with two hand-written format strings, which is how an error message comes to differ between the tier an author tests on and the tier they ship.