Skip to content

Commit

Permalink
Add links to fs::DirEntry::metadata
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
robyoung committed Jun 27, 2020
1 parent 394e1b4 commit 0e0584f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 0e0584f

Please sign in to comment.