diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-06-27 22:30:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-27 22:30:06 -0700 |
| commit | cdb59d90417b60bc373ab4ea44c768447a7c7994 (patch) | |
| tree | 823c15655105fd2a42b3a127a1a97b88288d0a48 | |
| parent | dc843a8c6d0cc1802b6fd1e804b35f1cef49db46 (diff) | |
| parent | 0e0584f290b5194e790a5d324cbab55a975ce714 (diff) | |
| download | rust-cdb59d90417b60bc373ab4ea44c768447a7c7994.tar.gz rust-cdb59d90417b60bc373ab4ea44c768447a7c7994.zip | |
Rollup merge of #73809 - robyoung:docs/add-links-to-DirEntry-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.
| -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 23bd8f6498b..17f890375f8 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -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 /// |
