-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
O_RDONLY and friends are missing #3
Comments
If you want I'll send a PR for this - I just wanted to make a note of this before a forgot! |
Good catch. We would have to make it cross-platform (constants are not same on UNIX and Windows). If you have the code ready you can send a PR. Otherwise I will add it and make sure it is correct on all supported platforms. |
Ok, I am finishing some testing using |
Commit 67b4cc0 just added these flags. Testing it now. |
Merged into master. |
Super - thank you :-) O_ACCMODE would be useful too for masking whether the mode is read or write. Here is the libc doc it says GNU only, but it is mentioned in the posix fnctl docs. Note sure whether that is supported on Windows though. |
MSVC does not define #define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR) So I will add a similar definition to |
Added with commit 3650807. Please note that on Windows |
That seems very sensible - thanks 👍 |
Normally I'd read O_RDONLY from syscall, but I don't think that will work on Windows, so thsese constants need to be duplicated in cgofuse.
These are necessary when working out which mode to open a file in (read or write) when the flags just can't be passed on.
The text was updated successfully, but these errors were encountered: