Skip to content

Commit

Permalink
Rollup merge of rust-lang#73809 - robyoung:docs/add-links-to-DirEntry…
Browse files Browse the repository at this point in the history
…-metadata, r=hanna-kruppe

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.
  • Loading branch information
Manishearth committed Jun 28, 2020
2 parents 2e7ac62 + 0e0584f commit 0eb1ce0
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 @@ -1445,7 +1445,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 0eb1ce0

Please sign in to comment.