directio icon indicating copy to clipboard operation
directio copied to clipboard

enable/disable O_DIRECT

Open thomasjungblut opened this issue 4 years ago • 1 comments

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?

thomasjungblut avatar Oct 29 '21 15:10 thomasjungblut

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?

ncw avatar Jan 18 '22 11:01 ncw