File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2045,13 +2045,17 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
2045
2045
///
2046
2046
/// # Platform-specific behavior
2047
2047
///
2048
- /// This function currently corresponds to `opendir `, `lstat `, `rm ` and `rmdir ` functions on Unix
2049
- /// and the `FindFirstFile`, `GetFileAttributesEx`, `DeleteFile`, and `RemoveDirectory` functions
2050
- /// on Windows.
2051
- /// Note that, this [may change in the future][changes].
2048
+ /// This function currently corresponds to `openat `, `fdopendir `, `unlinkat ` and `lstat ` functions
2049
+ /// on Unix (except for macOS before version 10.10 and REDOX) and the `CreateFileW`,
2050
+ /// `GetFileInformationByHandleEx`, `SetFileInformationByHandle`, and `NtOpenFile` functions on
2051
+ /// Windows. Note that, this [may change in the future][changes].
2052
2052
///
2053
2053
/// [changes]: io#platform-specific-behavior
2054
2054
///
2055
+ /// On macOS before version 10.10 and REDOX this function is not protected against time-of-check to
2056
+ /// time-of-use (TOCTOU) race conditions, and should not be used in security-sensitive code on
2057
+ /// those platforms. All other platforms are protected.
2058
+ ///
2055
2059
/// # Errors
2056
2060
///
2057
2061
/// See [`fs::remove_file`] and [`fs::remove_dir`].
You can’t perform that action at this time.
0 commit comments