Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Renamed GetFilesInFolder to GetFilesAndDirectoriesInFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
innerout authored and jacobdufault committed Jul 10, 2018
1 parent cd5da8a commit b523aa9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/include_complete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void IncludeComplete::InsertIncludesFromDirectory(std::string directory0,
}

std::vector<CompletionCandidate> results;
GetFilesInFolder(
GetFilesAndDirectoriesInFolder(
directory->path, true /*recursive*/, false /*add_folder_to_path*/,
[&](const std::string& path) {
if (!EndsWithAny(path, g_config->completion.includeSuffixWhitelist))
Expand Down
2 changes: 1 addition & 1 deletion src/project.cc
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ std::vector<Project::Entry> LoadFromDirectoryListing(
}
}

GetFilesInFolder(
GetFilesAndDirectoriesInFolder(
config->project_dir, true /*recursive*/, true /*add_folder_to_path*/,
[&folder_args, &files](const std::string& path) {
if (SourceFileLanguage(path) != LanguageId::Unknown) {
Expand Down
2 changes: 1 addition & 1 deletion src/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ bool RunIndexTests(const std::string& filter_path, bool enable_update) {
// FIXME: show diagnostics in STL/headers when running tests. At the moment
// this can be done by constructing ClangIndex index(1, 1);
ClangIndex index;
for (std::string path : GetFilesInFolder("index_tests", true /*recursive*/,
for (std::string path : GetFilesAndDirectoriesInFolder("index_tests", true /*recursive*/,
true /*add_folder_to_path*/)) {
bool is_fail_allowed = false;

Expand Down
4 changes: 2 additions & 2 deletions src/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void GetFilesInFolderHelper(
}
}

std::vector<std::string> GetFilesInFolder(std::string folder,
std::vector<std::string> GetFilesAndDirectoriesInFolder(std::string folder,
bool recursive,
bool add_folder_to_path) {
EnsureEndsInSlash(folder);
Expand All @@ -237,7 +237,7 @@ std::vector<std::string> GetFilesInFolder(std::string folder,
return result;
}

void GetFilesInFolder(std::string folder,
void GetFilesAndDirectoriesInFolder(std::string folder,
bool recursive,
bool add_folder_to_path,
const std::function<void(const std::string&)>& handler) {
Expand Down
4 changes: 2 additions & 2 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ bool ContainsValue(const TCollection& collection, const TValue& value) {
}

// Finds all files in the given folder. This is recursive.
std::vector<std::string> GetFilesInFolder(std::string folder,
std::vector<std::string> GetFilesAndDirectoriesInFolder(std::string folder,
bool recursive,
bool add_folder_to_path);
void GetFilesInFolder(std::string folder,
void GetFilesAndDirectoriesInFolder(std::string folder,
bool recursive,
bool add_folder_to_path,
const std::function<void(const std::string&)>& handler);
Expand Down

0 comments on commit b523aa9

Please sign in to comment.