diff options
| -rw-r--r-- | llvm/include/llvm/Support/PathV1.h | 9 | ||||
| -rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 5 | ||||
| -rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 7 |
3 files changed, 0 insertions, 21 deletions
diff --git a/llvm/include/llvm/Support/PathV1.h b/llvm/include/llvm/Support/PathV1.h index b38b1b090ed..146703c870b 100644 --- a/llvm/include/llvm/Support/PathV1.h +++ b/llvm/include/llvm/Support/PathV1.h @@ -267,15 +267,6 @@ namespace sys { LLVM_ATTRIBUTE_DEPRECATED(bool isSymLink() const, LLVM_PATH_DEPRECATED_MSG(fs::is_symlink)); - /// This function determines if the path name references a readable file - /// or directory in the file system. This function checks for - /// the existence and readability (by the current program) of the file - /// or directory. - /// @returns true if the pathname references a readable file. - /// @brief Determines if the path is a readable file or directory - /// in the file system. - bool canRead() const; - /// This function determines if the path name references a writable file /// or directory in the file system. This function checks for the /// existence and writability (by the current program) of the file or diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 02f2fb12544..658b67460ce 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -326,11 +326,6 @@ Path::isSymLink() const { bool -Path::canRead() const { - return 0 == access(path.c_str(), R_OK); -} - -bool Path::canWrite() const { return 0 == access(path.c_str(), W_OK); } diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index 1e453d01ee4..7fe64f68e2f 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -244,13 +244,6 @@ Path::isSymLink() const { } bool -Path::canRead() const { - // FIXME: take security attributes into account. - DWORD attr = GetFileAttributes(path.c_str()); - return attr != INVALID_FILE_ATTRIBUTES; -} - -bool Path::canWrite() const { // FIXME: take security attributes into account. DWORD attr = GetFileAttributes(path.c_str()); |

