diff options
| author | Rob Young <rob@robyoung.digital> | 2020-06-27 19:32:19 +0100 |
|---|---|---|
| committer | Rob Young <rob@robyoung.digital> | 2020-06-27 19:32:19 +0100 |
| commit | 0e0584f290b5194e790a5d324cbab55a975ce714 (patch) | |
| tree | d6cdbfca29bd83dd722aa1eb7a756a6912b92a25 /src/libstd | |
| parent | 394e1b40d264aa6928811919c1124fa248e7d802 (diff) | |
| download | rust-0e0584f290b5194e790a5d324cbab55a975ce714.tar.gz rust-0e0584f290b5194e790a5d324cbab55a975ce714.zip | |
Add links to fs::DirEntry::metadata
`fs::DirEntry::metadata` doesn't traverse symlinks. It is not immediately clear what to do if you do want to traverse symlinks. This change adds links to the two other `metadata` functions that will follow symlinks.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/fs.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index f4c164a324e..2a081fa65ca 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1429,7 +1429,10 @@ impl DirEntry { /// Returns the metadata for the file that this entry points at. /// /// This function will not traverse symlinks if this entry points at a - /// symlink. + /// symlink. To traverse symlinks use [`fs::metadata`] or [`fs::File::metadata`]. + /// + /// [`fs::metadata`]: fn.metadata.html + /// [`fs::File::metadata`]: struct.File.html#method.metadata /// /// # Platform-specific behavior /// |
