-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
std: Expose a mode
accessor for Permissions on unix
#22744
Conversation
Currently we have a `set_mode` mutator, so this just adds the pairing of a `mode` accessor to read the value. Closes rust-lang#22738
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @aturon (or others who feel comfortable) |
Note: I am not necessarily happy with this API in the long run! |
Currently we have a `set_mode` mutator, so this just adds the pairing of a `mode` accessor to read the value. Closes rust-lang#22738
⌛ Testing commit 537d694 with merge 8555419... |
💔 Test failed - auto-win-32-nopt-t |
@alexcrichton @aturon coming from the future to haunt you, well, it turns out that reading mode gives out a 16-bit format (includes the file type). It probably relays what ever value the OS has given directly. However reading after immediately setting the classic 9 bit format ( So this will fail on the second assert:
while the data is correct on the filesystem, this is a surprising behavior in the API. |
Currently we have a
set_mode
mutator, so this just adds the pairing of amode
accessor to read the value.Closes #22738