Skip to content

create_dir_all doc is unclear #88264

Closed
@Stargateur

Description

@Stargateur

If any directory in the path specified by path does not already exist and it could not be created otherwise. The specific error conditions for when a directory is being created (after it is determined to not exist) are outlined by fs::create_dir. source

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" ?

Notable exception is made for situations where any of the directories specified in the path could not be created as it was being created concurrently. Such cases are considered to be successful. That is, calling create_dir_all concurrently from multiple threads or processes is guaranteed not to fail due to a race condition with itself.

"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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions