diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-01-19 13:14:24 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-01-20 11:53:28 +0100 |
| commit | 42cb17e224e1c5ba6292adeb5b77db5bd19a7e3e (patch) | |
| tree | 9bc2ce8bffd4d70452b4398e54dd264dd3ebfe54 | |
| parent | 406cc071d6cfdfdb678bf3d83d766851de95abaf (diff) | |
| download | rust-42cb17e224e1c5ba6292adeb5b77db5bd19a7e3e.tar.gz rust-42cb17e224e1c5ba6292adeb5b77db5bd19a7e3e.zip | |
Update std::fs::remove_dir_all documentation
| -rw-r--r-- | library/std/src/fs.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index a14f1e2ecb2..f7f7a9ba4e4 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -2045,13 +2045,17 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> { /// /// # Platform-specific behavior /// -/// This function currently corresponds to `opendir`, `lstat`, `rm` and `rmdir` functions on Unix -/// and the `FindFirstFile`, `GetFileAttributesEx`, `DeleteFile`, and `RemoveDirectory` functions -/// on Windows. -/// Note that, this [may change in the future][changes]. +/// This function currently corresponds to `openat`, `fdopendir`, `unlinkat` and `lstat` functions +/// on Unix (except for macOS before version 10.10 and REDOX) and the `CreateFileW`, +/// `GetFileInformationByHandleEx`, `SetFileInformationByHandle`, and `NtOpenFile` functions on +/// Windows. Note that, this [may change in the future][changes]. /// /// [changes]: io#platform-specific-behavior /// +/// On macOS before version 10.10 and REDOX this function is not protected against time-of-check to +/// time-of-use (TOCTOU) race conditions, and should not be used in security-sensitive code on +/// those platforms. All other platforms are protected. +/// /// # Errors /// /// See [`fs::remove_file`] and [`fs::remove_dir`]. |
