diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-19 15:32:37 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-19 15:32:37 +0000 |
commit | 7c8397081c3d101fe467e8375601b091056465e0 (patch) | |
tree | c40f3e165ae04d0adc906d4b6476429adbb6db4e /lib/Support/Unix | |
parent | 8fe960ed50d3ad39d2a45f960ed8b9a69268035a (diff) | |
download | external_llvm-7c8397081c3d101fe467e8375601b091056465e0.zip external_llvm-7c8397081c3d101fe467e8375601b091056465e0.tar.gz external_llvm-7c8397081c3d101fe467e8375601b091056465e0.tar.bz2 |
Remove Path::getDirectoryContents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix')
-rw-r--r-- | lib/Support/Unix/Path.inc | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index f3e4b61..fd7e069 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -390,36 +390,6 @@ bool Path::makeWriteableOnDisk(std::string* ErrMsg) { } bool -Path::getDirectoryContents(std::set<Path>& result, std::string* ErrMsg) const { - DIR* direntries = ::opendir(path.c_str()); - if (direntries == 0) - return MakeErrMsg(ErrMsg, path + ": can't open directory"); - - std::string dirPath = path; - if (!lastIsSlash(dirPath)) - dirPath += '/'; - - result.clear(); - struct dirent* de = ::readdir(direntries); - for ( ; de != 0; de = ::readdir(direntries)) { - if (de->d_name[0] != '.') { - Path aPath(dirPath + (const char*)de->d_name); - struct stat st; - if (0 != lstat(aPath.path.c_str(), &st)) { - if (S_ISLNK(st.st_mode)) - continue; // dangling symlink -- ignore - return MakeErrMsg(ErrMsg, - aPath.path + ": can't determine file object type"); - } - result.insert(aPath); - } - } - - closedir(direntries); - return false; -} - -bool Path::set(StringRef a_path) { if (a_path.empty()) return false; |