Skip to content

Commit cdb59d9

Browse files
authored
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.
2 parents dc843a8 + 0e0584f commit cdb59d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/fs.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,10 @@ impl DirEntry {
14451445
/// Returns the metadata for the file that this entry points at.
14461446
///
14471447
/// This function will not traverse symlinks if this entry points at a
1448-
/// symlink.
1448+
/// symlink. To traverse symlinks use [`fs::metadata`] or [`fs::File::metadata`].
1449+
///
1450+
/// [`fs::metadata`]: fn.metadata.html
1451+
/// [`fs::File::metadata`]: struct.File.html#method.metadata
14491452
///
14501453
/// # Platform-specific behavior
14511454
///

0 commit comments

Comments
 (0)