You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a way of opening a file using the O_DIRECT flag. I saw that core_unix has a module Open_flags which includes O_DIRECT. This looks great. However, there appears to be no way to actually open a file with that flag (I think Open_flags are currently only used with fcntl). Is there any way to open a file with the O_DIRECT flag? Do you intend to add this functionality at some point? Do you know any libraries that currently support this flag? Thanks
The text was updated successfully, but these errors were encountered:
The O_DIRECT flag isn't supported by Unix.openfile because there's currently two types, Unix.open_flag (which is an alias to the one from the OCaml stdlib) and Open_flags.t, which includes O_DIRECT. Making Unix.openfile support the latter would probably be a decently big change.
As a workaround, could you use fcntl_setfl to set Open_flags.direct on the file descriptor after opening it? I realize the documentation may be a bit out of date on that function, as man fcntl says Linux supports setting O_DIRECT there.
I was looking for a way of opening a file using the O_DIRECT flag. I saw that core_unix has a module Open_flags which includes O_DIRECT. This looks great. However, there appears to be no way to actually open a file with that flag (I think Open_flags are currently only used with fcntl). Is there any way to open a file with the O_DIRECT flag? Do you intend to add this functionality at some point? Do you know any libraries that currently support this flag? Thanks
The text was updated successfully, but these errors were encountered: