diff options
author | Chris Lattner <sabre@nondot.org> | 2006-08-01 18:16:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-08-01 18:16:02 +0000 |
commit | 0d167276dddff2775d120c1a44842e0a3ecd283c (patch) | |
tree | e62198a811ff36b1de2d0788bab5c7a807c26e4e /lib/System/Unix/Path.inc | |
parent | 33b0e9c644838667262f40199b94b20a3524ae4a (diff) | |
download | llvm-0d167276dddff2775d120c1a44842e0a3ecd283c.tar.gz llvm-0d167276dddff2775d120c1a44842e0a3ecd283c.tar.bz2 llvm-0d167276dddff2775d120c1a44842e0a3ecd283c.tar.xz |
Remove some now-dead methods. Use getFileStatus instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/Path.inc')
-rw-r--r-- | lib/System/Unix/Path.inc | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 41349d940e..83885c31b0 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -236,38 +236,6 @@ Path::GetUserHomeDirectory() { 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 @@ void Path::makeExecutableOnDisk() { 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"); |