Skip to content

Commit adbd38d

Browse files
committed
[docs] Update references to renamed fs::stat function
1 parent 7140918 commit adbd38d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libstd/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,8 @@ pub trait PathExt {
12121212
fn read_dir(&self) -> io::Result<ReadDir>;
12131213

12141214
/// Boolean value indicator whether the underlying file exists on the local
1215-
/// filesystem. Returns false in exactly the cases where `fs::stat` fails.
1215+
/// filesystem. Returns false in exactly the cases where `fs::metadata`
1216+
/// fails.
12161217
fn exists(&self) -> bool;
12171218

12181219
/// Whether the underlying implementation (be it a file path, or something

src/libstd/path.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,8 @@ impl Path {
17421742
}
17431743

17441744
/// Boolean value indicator whether the underlying file exists on the local
1745-
/// filesystem. Returns false in exactly the cases where `fs::stat` fails.
1745+
/// filesystem. Returns false in exactly the cases where `fs::metadata`
1746+
/// fails.
17461747
#[stable(feature = "path_ext", since = "1.5.0")]
17471748
pub fn exists(&self) -> bool {
17481749
fs::metadata(self).is_ok()

0 commit comments

Comments
 (0)