提交 adbd38d8 编写于 作者: M Matt Brubeck

[docs] Update references to renamed fs::stat function

上级 71409184
......@@ -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
......
......@@ -1742,7 +1742,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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册