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

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 1 11:16:19 PDT 2006



Changes in directory llvm/lib/System/Unix:

Path.inc updated: 1.49 -> 1.50
---
Log message:

Remove some now-dead methods.  Use getFileStatus instead.


---
Diffs of the changes:  (+0 -34)

 Path.inc |   34 ----------------------------------
 1 files changed, 34 deletions(-)


Index: llvm/lib/System/Unix/Path.inc
diff -u llvm/lib/System/Unix/Path.inc:1.49 llvm/lib/System/Unix/Path.inc:1.50
--- llvm/lib/System/Unix/Path.inc:1.49	Tue Aug  1 12:51:09 2006
+++ llvm/lib/System/Unix/Path.inc	Tue Aug  1 13:16:02 2006
@@ -236,38 +236,6 @@
   return GetRootDirectory();
 }
 
-bool
-Path::isFile() const {
-  if (!exists())
-    return false;
-  struct stat buf;
-  if (stat(path.c_str(), &buf) != 0) {
-    ThrowErrno(path + ": can't determine type of path object: ");
-  }
-  return S_ISREG(buf.st_mode);
-}
-
-bool
-Path::isDirectory() const {
-  if (!exists())
-    return false;
-  struct stat buf;
-  if (0 != stat(path.c_str(), &buf)) {
-    ThrowErrno(path + ": can't determine type of path object: ");
-  }
-  return S_ISDIR(buf.st_mode);
-}
-
-bool
-Path::isHidden() const {
-  if (!exists())
-    return false;
-  size_t slash = path.rfind('/');
-  return (slash != std::string::npos && 
-          slash < path.length()-1 && 
-          path[slash+1] == '.') || 
-         (!path.empty() && slash == std::string::npos && path[0] == '.');
-}
 
 std::string
 Path::getBasename() const {
@@ -432,8 +400,6 @@
 
 bool
 Path::getDirectoryContents(std::set<Path>& result) const {
-  if (!isDirectory())
-    return false;
   DIR* direntries = ::opendir(path.c_str());
   if (direntries == 0)
     ThrowErrno(path + ": can't open directory");






More information about the llvm-commits mailing list