Skip to content

Commit c32e4ba

Browse files
committed
Document that fs::read_dir skips . and ..
1 parent 996ff2e commit c32e4ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/fs.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,8 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
20392039
///
20402040
/// The iterator will yield instances of [`io::Result`]`<`[`DirEntry`]`>`.
20412041
/// New errors may be encountered after an iterator is initially constructed.
2042+
/// Entries for the current and parent directories (typically `.` and `..`) are
2043+
/// skipped.
20422044
///
20432045
/// # Platform-specific behavior
20442046
///

0 commit comments

Comments
 (0)