[llvm-commits] CVS: llvm/lib/System/Win32/Path.inc

Reid Spencer reid at x10sys.com
Thu Jul 7 11:21:57 PDT 2005



Changes in directory llvm/lib/System/Win32:

Path.inc updated: 1.31 -> 1.32
---
Log message:

For PR495: http://llvm.cs.uiuc.edu/PR495 :
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.



---
Diffs of the changes:  (+6 -6)

 Path.inc |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/System/Win32/Path.inc
diff -u llvm/lib/System/Win32/Path.inc:1.31 llvm/lib/System/Win32/Path.inc:1.32
--- llvm/lib/System/Win32/Path.inc:1.31	Thu May  5 17:33:09 2005
+++ llvm/lib/System/Win32/Path.inc	Thu Jul  7 13:21:42 2005
@@ -139,14 +139,14 @@
   while( delim != 0 ) {
     std::string tmp(at, size_t(delim-at));
     if (tmpPath.setDirectory(tmp))
-      if (tmpPath.readable())
+      if (tmpPath.canRead())
         Paths.push_back(tmpPath);
     at = delim + 1;
     delim = strchr(at, ';');
   }
   if (*at != 0)
     if (tmpPath.setDirectory(std::string(at)))
-      if (tmpPath.readable())
+      if (tmpPath.canRead())
         Paths.push_back(tmpPath);
 
 }
@@ -167,7 +167,7 @@
   {
     Path tmpPath;
     if (tmpPath.setDirectory(LLVM_LIBDIR))
-      if (tmpPath.readable())
+      if (tmpPath.canRead())
         Paths.push_back(tmpPath);
   }
 #endif
@@ -237,21 +237,21 @@
 }
 
 bool
-Path::readable() const {
+Path::canRead() const {
   // FIXME: take security attributes into account.
   DWORD attr = GetFileAttributes(path.c_str());
   return attr != INVALID_FILE_ATTRIBUTES;
 }
 
 bool
-Path::writable() const {
+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::executable() const {
+Path::canExecute() const {
   // FIXME: take security attributes into account.
   DWORD attr = GetFileAttributes(path.c_str());
   return attr != INVALID_FILE_ATTRIBUTES;






More information about the llvm-commits mailing list