Skip to content

Commit 7d3477c

Browse files
committed
Auto merge of #29755 - mbrubeck:stat-doc, r=steveklabnik
Moved from #29753. r? @steveklabnik
2 parents 19bdf87 + adbd38d commit 7d3477c

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
@@ -1211,7 +1211,8 @@ pub trait PathExt {
12111211
fn read_dir(&self) -> io::Result<ReadDir>;
12121212

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

12171218
/// 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
@@ -1832,7 +1832,8 @@ impl Path {
18321832
}
18331833

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

0 commit comments

Comments
 (0)