Skip to content

Commit

Permalink
Rollup merge of #112950 - tshepang:patch-4, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
DirEntry::file_name: improve explanation
  • Loading branch information
matthiaskrgr authored Jun 25, 2023
2 parents 8816f9e + 6f61f6b commit 8630b1b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 8630b1b

Please sign in to comment.