Auto merge of #29755 - mbrubeck:stat-doc, r=steveklabnik

Moved from #29753. r? @steveklabnik
This commit is contained in:
bors
2015-11-11 11:09:43 +00:00
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -1211,7 +1211,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
+2 -1
View File
@@ -1832,7 +1832,8 @@ pub fn read_dir(&self) -> io::Result<fs::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.
#[stable(feature = "path_ext", since = "1.5.0")]
pub fn exists(&self) -> bool {
fs::metadata(self).is_ok()