Skip to content

Commit

Permalink
[docs] Update references to renamed fs::stat function
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Nov 10, 2015
1 parent 7140918 commit adbd38d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/libstd/fs.rs
Expand Up @@ -1212,7 +1212,8 @@ pub trait PathExt {
fn read_dir(&self) -> io::Result<ReadDir>;

/// 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
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/path.rs
Expand Up @@ -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()
Expand Down

0 comments on commit adbd38d

Please sign in to comment.