MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_recursive_dir_list_multithread

Method get_recursive_dir_list_multithread

utility/common.cpp:178–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176} //namespace
177
178Vector<String> gdre::get_recursive_dir_list_multithread(
179 const String &dir,
180 const Vector<String> &wildcards,
181 bool absolute,
182 bool include_hidden,
183 const Vector<String> &p_exclude_filters,
184 bool files_first,
185 bool exclude_dot_prefix_and_gdignore,
186 bool show_progress) {
187 Vector<String> banned_files;
188 Vector<String> exclude_filters;
189 for (auto &wc : p_exclude_filters) {
190 // if the wildcard starts with '*/' and has no '/' following it, then it is a banned file
191 if (wc.begins_with("*/") && wc.substr(2).find("/") == -1) {
192 banned_files.push_back(wc.trim_prefix("*/"));
193 } else {
194 exclude_filters.push_back(wc);
195 }
196 }
197 RecursiveListDirTaskData task_data{
198 dir,
199 wildcards,
200 absolute,
201 exclude_filters,
202 banned_files,
203 include_hidden,
204 files_first,
205 exclude_dot_prefix_and_gdignore,
206 show_progress
207 };
208 return task_data.run();
209}
210
211Vector<String> gdre::get_recursive_dir_list(const String &p_dir, const Vector<String> &wildcards, bool absolute, bool include_hidden) {
212 Vector<String> ret;

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
findMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected