fs: clarify create_dir_all succeeds if path exists (#8149)

This commit is contained in:
吴杨帆
2026-05-21 15:43:17 +02:00
committed by GitHub
parent 1fe1b0e727
commit 82fe082ef1
+3
View File
@@ -26,6 +26,9 @@ use std::path::Path;
/// when a directory is being created (after it is determined to not exist) are
/// outlined by [`fs::create_dir`].
///
/// If the final component at `path` already exists and is a directory, this
/// function will also return successfully without error.
///
/// 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`