Skip to content

Commit 8630b1b

Browse files
authored
Rollup merge of rust-lang#112950 - tshepang:patch-4, r=Mark-Simulacrum
DirEntry::file_name: improve explanation
2 parents 8816f9e + 6f61f6b commit 8630b1b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

library/std/src/fs.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -1755,8 +1755,14 @@ impl DirEntry {
17551755
self.0.file_type().map(FileType)
17561756
}
17571757

1758-
/// Returns the bare file name of this directory entry without any other
1759-
/// leading path component.
1758+
/// Returns the file name of this directory entry without any
1759+
/// leading path component(s).
1760+
///
1761+
/// As an example,
1762+
/// the output of the function will result in "foo" for all the following paths:
1763+
/// - "./foo"
1764+
/// - "/the/foo"
1765+
/// - "../../foo"
17601766
///
17611767
/// # Examples
17621768
///

0 commit comments

Comments
 (0)