From 7bffa310426ebcc01cfb1756ae1883118a32366b 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 --- library/std/src/fs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 76fdb1a4ffd..555e8804eab 100644 --- a/library/std/src/fs.rs +++ b/library/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