Skip to content

Documented caveat of the remove_dir_all #29324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,11 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// Removes a directory at this path, after removing all its contents. Use
/// carefully!
///
/// This function does **not** follow symbolic links and it will simply remove the
/// symbolic link itself.
/// This function does **not** follow symbolic links **inside** the
/// directory and it will simply remove the symbolic link itself.
/// But if a directory is **itself** a symbolic link to a directory
/// it will first clean the target directory, then fail with the
/// "Not a directory" error.
///
/// # Errors
///
Expand Down