File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2503,11 +2503,15 @@ impl Path {
25032503 /// # See Also
25042504 ///
25052505 /// This is a convenience function that coerces errors to false. If you want to
2506- /// check errors, call [fs::metadata] and handle its Result. Then call
2507- /// [fs::Metadata::is_file] if it was Ok.
2506+ /// check errors, call [` fs::metadata` ] and handle its Result. Then call
2507+ /// [` fs::Metadata::is_file` ] if it was Ok.
25082508 ///
2509- /// [fs::metadata]: ../../std/fs/fn.metadata.html
2510- /// [fs::Metadata::is_file]: ../../std/fs/struct.Metadata.html#method.is_file
2509+ /// Note that the explanation about using `!is_dir` instead of `is_file`
2510+ /// that is present in the [`fs::Metadata`] documentation also applies here.
2511+ ///
2512+ /// [`fs::metadata`]: ../../std/fs/fn.metadata.html
2513+ /// [`fs::Metadata`]: ../../std/fs/struct.Metadata.html
2514+ /// [`fs::Metadata::is_file`]: ../../std/fs/struct.Metadata.html#method.is_file
25112515 #[ stable( feature = "path_ext" , since = "1.5.0" ) ]
25122516 pub fn is_file ( & self ) -> bool {
25132517 fs:: metadata ( self ) . map ( |m| m. is_file ( ) ) . unwrap_or ( false )
You can’t perform that action at this time.
0 commit comments