API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards...
[oota-llvm.git] / lib / System / Unix / Path.inc
index 8dd76a741285c7c2329a433dcd28801eb1d6983f..4300d6719b3393e26f7174f6babf4f5ae10ebb24 100644 (file)
@@ -454,17 +454,17 @@ Path::canWrite() const {
 }
 
 bool
-Path::isSpecialFile() const {
+Path::isRegularFile() const {
   // Get the status so we can determine if its a file or directory
   struct stat buf;
 
   if (0 != stat(path.c_str(), &buf))
-    return true;
-
-  if (S_ISDIR(buf.st_mode) || S_ISREG(buf.st_mode))
     return false;
 
-  return true;
+  if (S_ISREG(buf.st_mode))
+    return true;
+
+  return false;
 }
 
 bool