pub fn readPositionalAll(file: File, io: Io, buffer: []u8, offset: u64) ReadPositionalError!usize 573
574
575
576
577
578
579
580
581pub 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;
}
Equivalent to creating a positional reader and reading multiple times to fill
buffer.Returns number of bytes read into
buffer. If less thanbuffer.len, end of file occurred.See also:
reader