diff options
| author | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-04-20 14:32:33 +0800 |
|---|---|---|
| committer | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-04-20 14:32:33 +0800 |
| commit | 3a372e39ca54339925bf01ead93b3c1dc01078d2 (patch) | |
| tree | 86505ff6c2e9fe5790a6ece7912151888fb3ad78 /library/std/src | |
| parent | f433fa46b0fd27d35219357ad75f54d294081bc4 (diff) | |
| download | rust-3a372e39ca54339925bf01ead93b3c1dc01078d2.tar.gz rust-3a372e39ca54339925bf01ead93b3c1dc01078d2.zip | |
std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/fs.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 801baf3d990..0e306d23dd9 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -2874,6 +2874,8 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> { /// /// Consider ignoring the error if validating the removal is not required for your use case. /// +/// This function may return [`io::ErrorKind::DirectoryNotEmpty`] if the directory is concurrently +/// written into, which typically indicates some contents were removed but not all. /// [`io::ErrorKind::NotFound`] is only returned if no removal occurs. /// /// [`fs::remove_file`]: remove_file |
