Closed damianday closed 5 years ago
This doesn't seem possible. std.io does not buffer data, and so cannot store data we might read to check this anywhere. We are just wrapping the OS primitives, so there's nowhere to put this information. I'd suggest picking a higher level library (such as iopipe) which can store this (this might be a good addition to iopipe, maybe file an issue there so I remember).
I know it's trivial to just check returned value from read or write but it would be nicer syntactically and mentally.