Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a3c9597

Browse files
committedNov 18, 2024
Mention std::fs::remove_dir_all in std::fs::remove_dir
1 parent c1beb25 commit a3c9597

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎std/src/fs.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2738,6 +2738,10 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
27382738

27392739
/// Removes an empty directory.
27402740
///
2741+
/// If you want to remove a directory that is not empty, as well as all
2742+
/// of its contents recursively, consider using [`remove_dir_all`]
2743+
/// instead.
2744+
///
27412745
/// # Platform-specific behavior
27422746
///
27432747
/// This function currently corresponds to the `rmdir` function on Unix

0 commit comments

Comments
 (0)
Failed to load comments.