Std.Io.readAllBytes
1 declaration
fn
readAllBytes: Str -> Result[Bytes, Std.Io.IoError]This is a callable function.
What it does
Every byte of a file, joined once rather than once per chunk.
Named so its cost is visible: this is the wrapper that decides the memory
profile of the program using it, and foldChunks is the one that does not.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- Names inside [ ] are type arguments, such as the item type held by a collection.
- Result makes success and recoverable failure part of the function's type.
