Skip to content

Commit 8ba01a1

Browse files
committed
Auto merge of #39203 - ranma42:doc_metadata, r=BurntSushi
Document that `Metadata` can be obtained from `symlink_metadata` When retrieving the information about a syslink (specifically, when invoking `Metadata::is_symlink`) you generally want the `syslink_metadata`. It would be natural to point at both options to retrieve a `Metadata` value, as they are both appropriate (for different use cases).
2 parents c2a0d1b + 7803711 commit 8ba01a1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/libstd/fs.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,13 @@ pub struct File {
9090

9191
/// Metadata information about a file.
9292
///
93-
/// This structure is returned from the [`metadata`] function or method and
94-
/// represents known metadata about a file such as its permissions, size,
95-
/// modification times, etc.
93+
/// This structure is returned from the [`metadata`] or
94+
/// [`symlink_metadata`] function or method and represents known
95+
/// metadata about a file such as its permissions, size, modification
96+
/// times, etc.
9697
///
9798
/// [`metadata`]: fn.metadata.html
99+
/// [`symlink_metadata`]: fn.symlink_metadata.html
98100
#[stable(feature = "rust1", since = "1.0.0")]
99101
#[derive(Clone)]
100102
pub struct Metadata(fs_imp::FileAttr);

0 commit comments

Comments
 (0)