From 6d47489e568a80b2c29c56b3664cc41c30a8f8fa Mon Sep 17 00:00:00 2001 From: Fluid <90795031+fluiderson@users.noreply.github.com> Date: Fri, 23 May 2025 23:57:38 +0300 Subject: [PATCH] improve the `std::fs::create_dir_all` docs related to atomicity --- library/std/src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 509e673bdb8b9..8047c0c03ad4f 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -2803,8 +2803,8 @@ pub fn create_dir>(path: P) -> io::Result<()> { /// Recursively create a directory and all of its parent components if they /// are missing. /// -/// If this function returns an error, some of the parent components might have -/// been created already. +/// This function is not atomic. If it returns an error, any parent components it was able to create +/// will remain. /// /// If the empty path is passed to this function, it always succeeds without /// creating any directories.