directio
directio copied to clipboard
enable/disable O_DIRECT
Hey there,
thanks for this awesome library! I was playing around with this today a bit.
I do have a somewhat silly requirement in that some writes may not be aligned with the block size (forced flushes/fsyncs out of my control). On Linux it's fairly easy to toggle O_DIRECT on and off through fcntl, I assume on MAC it works the same using F_NOCACHE.
Now I'm currently browsing the win APIs, but I don't find anything similar. Do you have a clue?
Would you be ok if I'd send you a PR for such a feature?
Sorry for the delay in responding!
If you wanted to send a PR like that it would be fine with me, however it would need to work on all platforms or possibly give an error if not supported. Any idea about Windows support?