Function readToEndAlloc [src]
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.
Prototype
pub fn readToEndAlloc(self: File, allocator: Allocator, max_bytes: usize) ![]u8
Parameters
self: File
allocator: Allocator
max_bytes: usize
Source
pub fn readToEndAlloc(self: File, allocator: Allocator, max_bytes: usize) ![]u8 {
return self.readToEndAllocOptions(allocator, max_bytes, null, @alignOf(u8), null);
}