summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/PathV1.h9
-rw-r--r--lib/Support/Unix/Path.inc6
-rw-r--r--lib/Support/Windows/Path.inc7
3 files changed, 0 insertions, 22 deletions
diff --git a/include/llvm/Support/PathV1.h b/include/llvm/Support/PathV1.h
index 146703c870..550da31946 100644
--- a/include/llvm/Support/PathV1.h
+++ b/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 writable file
- /// or directory in the file system. This function checks for the
- /// existence and writability (by the current program) of the file or
- /// directory.
- /// @returns true if the pathname references a writable file.
- /// @brief Determines if the path is a writable file or directory
- /// in the file system.
- bool canWrite() const;
-
/// This function checks that what we're trying to work only on a regular
/// file. Check for things like /dev/null, any block special file, or
/// other things that aren't "regular" regular files.
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index 658b67460c..fad2697cdb 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -324,12 +324,6 @@ Path::isSymLink() const {
return S_ISLNK(buf.st_mode);
}
-
-bool
-Path::canWrite() const {
- return 0 == access(path.c_str(), W_OK);
-}
-
bool
Path::isRegularFile() const {
// Get the status so we can determine if it's a file or directory
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc
index 7fe64f68e2..de33fdbc6f 100644
--- a/lib/Support/Windows/Path.inc
+++ b/lib/Support/Windows/Path.inc
@@ -244,13 +244,6 @@ Path::isSymLink() const {
}
bool
-Path::canWrite() const {
- // FIXME: take security attributes into account.
- DWORD attr = GetFileAttributes(path.c_str());
- return (attr != INVALID_FILE_ATTRIBUTES) && !(attr & FILE_ATTRIBUTE_READONLY);
-}
-
-bool
Path::canExecute() const {
// FIXME: take security attributes into account.
DWORD attr = GetFileAttributes(path.c_str());