summaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/FileSystem.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-10-31 22:09:58 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-10-31 22:09:58 +0000
commitfd9461f5e46ce0eca0397e6eeed4f9cea541da08 (patch)
treebff7329042fe52a166b1c53df2f188506482ce7e /lldb/source/Host/common/FileSystem.cpp
parent3a06c464708b06f54e86911c37d796225bd9dfa8 (diff)
[FileSystem] Remove EnumerateDirectory
The new implementation of EnumerateDirectory relies on `::no_push()` being implemented for the VFS recursive directory iterators. However this patch (D53465) hasn't been landed yet. llvm-svn: 345787
Diffstat (limited to 'lldb/source/Host/common/FileSystem.cpp')
-rw-r--r--lldb/source/Host/common/FileSystem.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp
index aa181ecdd119..c985ebb81156 100644
--- a/lldb/source/Host/common/FileSystem.cpp
+++ b/lldb/source/Host/common/FileSystem.cpp
@@ -96,36 +96,6 @@ bool FileSystem::Readable(const FileSpec &file_spec) const {
return Readable(file_spec.GetPath());
}
-void FileSystem::EnumerateDirectory(Twine path, bool find_directories,
- bool find_files, bool find_other,
- EnumerateDirectoryCallbackType callback,
- void *callback_baton) {
- std::error_code EC;
- vfs::recursive_directory_iterator Iter(*m_fs, path, EC);
- vfs::recursive_directory_iterator End;
- for (; Iter != End && !EC; Iter.increment(EC)) {
- const auto &Item = *Iter;
- ErrorOr<vfs::Status> Status = m_fs->status(Item.path());
- if (!Status)
- break;
- if (!find_files && Status->isRegularFile())
- continue;
- if (!find_directories && Status->isDirectory())
- continue;
- if (!find_other && Status->isOther())
- continue;
-
- auto Result = callback(callback_baton, Status->getType(), Item.path());
- if (Result == eEnumerateDirectoryResultQuit)
- return;
- if (Result == eEnumerateDirectoryResultNext) {
- // Default behavior is to recurse. Opt out if the callback doesn't want
- // this behavior.
- Iter.no_push();
- }
- }
-}
-
std::error_code FileSystem::MakeAbsolute(SmallVectorImpl<char> &path) const {
return m_fs->makeAbsolute(path);
}