From a3c95972a3b068f888052bacd00509b2addd1a83 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Mon, 18 Nov 2024 18:42:00 +0100 Subject: [PATCH] Mention std::fs::remove_dir_all in std::fs::remove_dir --- std/src/fs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/std/src/fs.rs b/std/src/fs.rs index 76fdb1a4ffd30..555e8804eab33 100644 --- a/std/src/fs.rs +++ b/std/src/fs.rs @@ -2738,6 +2738,10 @@ pub fn create_dir_all>(path: P) -> io::Result<()> { /// Removes an empty directory. /// +/// If you want to remove a directory that is not empty, as well as all +/// of its contents recursively, consider using [`remove_dir_all`] +/// instead. +/// /// # Platform-specific behavior /// /// This function currently corresponds to the `rmdir` function on Unix