Yeah, but it's not a terribly good one. The short answer is that
.write are different from append. Read and write (what NIO calls modes) form (along with read-write mode) a set of options that you must pass exactly one of to the
open syscall. That is,
open requires exactly one of
Notice that none of those are
O_APPEND. This is because
O_APPEND is a modifying flag: it modifies the behaviour of writes. But it doesn't replace write mode: you have to set
O_APPEND and a write mode.
With that said, I agree with you: while this API is pedantically correct, it's not all that helpful, and an append mode would certainly ease the user interaction with the API. We already have an issue for it: https://github.com/apple/swift-nio/issues/1779. We'd love it if someone in the community felt motivated to add it.