[llvm] r184235 - Remove Path::canWrite.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jun 18 14:10:03 PDT 2013
Author: rafael
Date: Tue Jun 18 16:10:03 2013
New Revision: 184235
URL: http://llvm.org/viewvc/llvm-project?rev=184235&view=rev
Log:
Remove Path::canWrite.
Modified:
llvm/trunk/include/llvm/Support/PathV1.h
llvm/trunk/lib/Support/Unix/Path.inc
llvm/trunk/lib/Support/Windows/Path.inc
Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=184235&r1=184234&r2=184235&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Tue Jun 18 16:10:03 2013
@@ -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.
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=184235&r1=184234&r2=184235&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Tue Jun 18 16:10:03 2013
@@ -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
Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=184235&r1=184234&r2=184235&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Tue Jun 18 16:10:03 2013
@@ -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());
More information about the llvm-commits
mailing list