From 4792d28ef1ce958698d20d7c20baa78c83c3140e Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 2 Aug 2017 15:40:08 +0100 Subject: [PATCH] Emphasise that these functions look at the disk, not just the path --- src/libstd/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index e083ab0ef97..c90a0c78527 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -2237,7 +2237,7 @@ pub fn exists(&self) -> bool { fs::metadata(self).is_ok() } - /// Returns whether the path is pointing at a regular file. + /// Returns whether the path exists on disk and is pointing at a regular file. /// /// This function will traverse symbolic links to query information about the /// destination file. In case of broken symbolic links this will return `false`. @@ -2266,7 +2266,7 @@ pub fn is_file(&self) -> bool { fs::metadata(self).map(|m| m.is_file()).unwrap_or(false) } - /// Returns whether the path is pointing at a directory. + /// Returns whether the path exists on disk and is pointing at a directory. /// /// This function will traverse symbolic links to query information about the /// destination file. In case of broken symbolic links this will return `false`. -- GitLab