We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55663a7 commit 36e050bCopy full SHA for 36e050b
library/std/src/path.rs
@@ -2743,6 +2743,12 @@ impl Path {
2743
/// assert_eq!(link_path.is_symlink(), true);
2744
/// assert_eq!(link_path.exists(), false);
2745
/// ```
2746
+ ///
2747
+ /// # See Also
2748
2749
+ /// This is a convenience function that coerces errors to false. If you want to
2750
+ /// check errors, call [`fs::symlink_metadata`] and handle its [`Result`]. Then call
2751
+ /// [`fs::Metadata::is_symlink`] if it was [`Ok`].
2752
#[stable(feature = "is_symlink", since = "1.57.0")]
2753
pub fn is_symlink(&self) -> bool {
2754
fs::symlink_metadata(self).map(|m| m.is_symlink()).unwrap_or(false)
0 commit comments