Rollup merge of #112950 - tshepang:patch-4, r=Mark-Simulacrum

DirEntry::file_name: improve explanation
This commit is contained in:
Matthias Krüger 2023-06-25 02:04:20 +02:00 committed by GitHub
commit 8630b1b3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1755,8 +1755,14 @@ pub fn file_type(&self) -> io::Result<FileType> {
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
///