Skip to content

Commit 0e0584f

Browse files
committed
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.
1 parent 394e1b4 commit 0e0584f

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
@@ -1429,7 +1429,10 @@ impl DirEntry {
14291429
/// Returns the metadata for the file that this entry points at.
14301430
///
14311431
/// This function will not traverse symlinks if this entry points at a
1432-
/// symlink.
1432+
/// symlink. To traverse symlinks use [`fs::metadata`] or [`fs::File::metadata`].
1433+
///
1434+
/// [`fs::metadata`]: fn.metadata.html
1435+
/// [`fs::File::metadata`]: struct.File.html#method.metadata
14331436
///
14341437
/// # Platform-specific behavior
14351438
///

0 commit comments

Comments
 (0)