-
Notifications
You must be signed in to change notification settings - Fork 13.4k
create_dir_all doc is unclear #88264
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hi, I'm a little new to OSS and was looking for an easy place to get started contributing. I'll also submit a PR request if that's easier to review. I'm still getting familiar with Rust documentation and resources, so sorry in advance if I step on toes! I know this issue was created a while ago, but it looks like the wording has not yet been changed in the official docs. Here's what I was thinking in terms of how to change the wording from above: This function will return an error in the following situation, but is not limited to just this case:
A notable exception is made for any directories in the specified path that cannot be created because a concurrent process is creating those same directories. Such cases are considered to be successful; Calling create_dir_all is guaranteed to not fail as a result of a race condition with itself. Here are the changes I made + the reasoning:
Thanks for your time and energy reviewing this! --Sami |
@saminoorsyed for future reference, just submit suggested changes as a PR where they can get reviewed and picked up :) It looks like #126548 covers this now. |
Improved clarity of documentation for std::fs::create_dir_all Closes rust-lang#88264
Rollup merge of rust-lang#126548 - rik86189:issue-88264-fix, r=tgross35 Improved clarity of documentation for std::fs::create_dir_all Closes rust-lang#88264
Uh oh!
There was an error while loading. Please reload this page.
Is very unclear for me. I think a clarification wouldn't hurt. Does this mean "If a directory doesn't exist and can't be create" ?
"could not be created as it was being created concurrently" is also not very clear.
Overall, I think this doc could be rewrite using more straightforward sentence, and more simple english.
The text was updated successfully, but these errors were encountered: