Skip to content

Commit 1e88461

Browse files
committed
Update std::fs::remove_dir_all documentation
1 parent a935222 commit 1e88461

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

library/std/src/fs.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -2041,13 +2041,17 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
20412041
///
20422042
/// # Platform-specific behavior
20432043
///
2044-
/// This function currently corresponds to `opendir`, `lstat`, `rm` and `rmdir` functions on Unix
2045-
/// and the `FindFirstFile`, `GetFileAttributesEx`, `DeleteFile`, and `RemoveDirectory` functions
2046-
/// on Windows.
2047-
/// Note that, this [may change in the future][changes].
2044+
/// This function currently corresponds to `openat`, `fdopendir`, `unlinkat` and `lstat` functions
2045+
/// on Unix (except for macOS before version 10.10 and REDOX) and the `CreateFileW`,
2046+
/// `GetFileInformationByHandleEx`, `SetFileInformationByHandle`, and `NtOpenFile` functions on
2047+
/// Windows. Note that, this [may change in the future][changes].
20482048
///
20492049
/// [changes]: io#platform-specific-behavior
20502050
///
2051+
/// On macOS before version 10.10 and REDOX this function is not protected against time-of-check to
2052+
/// time-of-use (TOCTOU) race conditions, and should not be used in security-sensitive code on
2053+
/// those platforms. All other platforms are protected.
2054+
///
20512055
/// # Errors
20522056
///
20532057
/// See [`fs::remove_file`] and [`fs::remove_dir`].

0 commit comments

Comments
 (0)