fn preadAll(self: File, buffer: []u8, offset: u64) PReadError!usize

Returns the number of bytes read. If the number read is smaller than buffer.len, it means the file reached the end. Reaching the end of a file is not an error condition. On Windows, this function currently does alter the file pointer. https://github.com/ziglang/zig/issues/12783

Parameters

self: File,
buffer: []u8,
offset: u64,