diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 6178f1bbb8e1..c62bf561655a 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1212,7 +1212,8 @@ pub trait PathExt { fn read_dir(&self) -> io::Result; /// Boolean value indicator whether the underlying file exists on the local - /// filesystem. Returns false in exactly the cases where `fs::stat` fails. + /// filesystem. Returns false in exactly the cases where `fs::metadata` + /// fails. fn exists(&self) -> bool; /// Whether the underlying implementation (be it a file path, or something diff --git a/src/libstd/path.rs b/src/libstd/path.rs index fe12b671235a..8c227a936046 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1742,7 +1742,8 @@ impl Path { } /// Boolean value indicator whether the underlying file exists on the local - /// filesystem. Returns false in exactly the cases where `fs::stat` fails. + /// filesystem. Returns false in exactly the cases where `fs::metadata` + /// fails. #[stable(feature = "path_ext", since = "1.5.0")] pub fn exists(&self) -> bool { fs::metadata(self).is_ok()