File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2503,11 +2503,15 @@ impl Path {
2503
2503
/// # See Also
2504
2504
///
2505
2505
/// 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.
2508
2508
///
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
2511
2515
#[ stable( feature = "path_ext" , since = "1.5.0" ) ]
2512
2516
pub fn is_file ( & self ) -> bool {
2513
2517
fs:: metadata ( self ) . map ( |m| m. is_file ( ) ) . unwrap_or ( false )
You can’t perform that action at this time.
0 commit comments