okio icon indicating copy to clipboard operation
okio copied to clipboard

Document and specify partial failures in File.sink() and File.source().

Open swankjesse opened this issue 3 years ago • 0 comments

Because these are implemented segment-at-a-time we have the opportunity for a syscall to succeed on one access and fail on the next.

We should write tests to exercise this situation, and confirm the resulting state is well-defined. In particular:

  • Users’ provided input buffers are in an acceptable state. Can these grow or shrink partially?
  • Subsequent accesses reliably fail. Otherwise we need to guarantee what bytes are accessed next.

swankjesse avatar Apr 04 '21 13:04 swankjesse