Equivalent to creating a positional reader and reading multiple times to fill buffer.
Returns number of bytes read into buffer. If less than buffer.len, end of file occurred.
See also:
readerpub fn readPositionalAll(file: File, io: Io, buffer: []u8, offset: u64) ReadPositionalError!usize
pub fn readPositionalAll(file: File, io: Io, buffer: []u8, offset: u64) ReadPositionalError!usize {
var index: usize = 0;
while (index != buffer.len) {
const amt = try file.readPositional(io, &.{buffer[index..]}, offset + index);
if (amt == 0) break;
index += amt;
}
return index;
}