diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-25 02:04:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-25 02:04:20 +0200 |
| commit | 8630b1b3f4b4e41c485ec5f7e696a519d99f7295 (patch) | |
| tree | d3e356fcb36f5f932c1b95e0ea0f9b7495ed60d1 /library/std | |
| parent | 8816f9ee1eeb94c10f7ee6e08c5cae3b3575e987 (diff) | |
| parent | 6f61f6ba11a1917f3bf7b1bd8054c12bd4e7b6ec (diff) | |
| download | rust-8630b1b3f4b4e41c485ec5f7e696a519d99f7295.tar.gz rust-8630b1b3f4b4e41c485ec5f7e696a519d99f7295.zip | |
Rollup merge of #112950 - tshepang:patch-4, r=Mark-Simulacrum
DirEntry::file_name: improve explanation
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/fs.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 89dfdfafdb1..c2d82169dc3 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -1755,8 +1755,14 @@ impl DirEntry { self.0.file_type().map(FileType) } - /// Returns the bare file name of this directory entry without any other - /// leading path component. + /// Returns the file name of this directory entry without any + /// leading path component(s). + /// + /// As an example, + /// the output of the function will result in "foo" for all the following paths: + /// - "./foo" + /// - "/the/foo" + /// - "../../foo" /// /// # Examples /// |
