Expand description
2026-09-25: Positional file reads and writes at an explicit offset:
FileExt::read_at/write_at on unix, seek_read/seek_write on Windows.
Bounds checks and record layout stay with the callers (backend/posix.rs,
expert_pack_fs.rs, expert_tier.rs, ngram_cache_fault.rs).
Owner: storage (tier). Invariants: a transfer shorter than requested is retried from where it stopped; a zero-byte transfer ends the loop.
Functionsยง
- read_
at_ least_ at - 2026-09-25: Fill as much of
bufas the file holds fromoffset, and succeed if at least the firstneededbytes arrived. Returns the byte count read. Fewer thanneededis anUnexpectedEoferror. - read_
exact_ at - 2026-09-25: Fill
buffromoffset. A zero-byte read beforebufis full is anUnexpectedEoferror, so the tail ofbufis never left stale. - write_
all_ at - 2026-09-25: Write all of
bufatoffset. A write of zero bytes is aWriteZeroerror.