-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Abstract unix file permissions in file api's #2623
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
Comments
We appear to only ignore the mode argument on Windows, so this will need someone who knows how Windows prefers to handle modes. |
I think we ought to abstract concepts like file-modes at the |
cc me |
The API's have been cleaned up a lot but this comment still exists in native::file. We can probably look at what libuv does with these flags for some hints as to what to do on windows. We are still directly exposing the unix permission flags in the API and we might want to reconsider whether this is right. In particular we are still just or-ing together bits instead of using something type safe, not to mention that the unix model doesn't make so much sense on windows. |
Updated title to better reflect the problem: our file API's expose unix-style file permissions that are simply ignored on windows. |
File systems without support for permission bits are often used on Linux and other *nix operating systems. The issue is handled by pretending setting permissions worked, even though it's not doing anything. Since we're already forced into this behaviour on *nix for a file system like FAT32, we do already have a consistent API on Windows. Unless someone can explain what we're doing wrong, I don't see a bug here. |
Add `rc_buffer` lint for checking Rc<String> and friends Fixes rust-lang#2623 This is a bit different from the original PR attempting to implement this type of lint. Rather than linting against converting into the unwanted types, this PR lints against declaring the unwanted type in a struct or function definition. I'm reasonably happy with what I have here, although I used the fully qualified type names for the Path and OsString suggestions, and I'm not sure if I should have just used the short versions instead, even if they might not have been declared via use. Also, I don't know if "buffer type" is the best way to put it or not. Alternatively I could call it a "growable type" or "growable buffer type", but I was thinking of PathBuf when I started making the lint. changelog: Add `rc_buffer` lint
change cronjob time This way it is again in my morning.
change cronjob time This way it is again in my morning.
FIXME says "turn mode into something useful?"
The text was updated successfully, but these errors were encountered: