fn readToEndAlloc(self: File, allocator: mem.Allocator, max_bytes: usize) ![]u8

Reads all the bytes from the current position to the end of the file. On success, caller owns returned buffer. If the file is larger than max_bytes, returns error.FileTooBig.

Parameters

self: File,
allocator: mem.Allocator,
max_bytes: usize,