| 176 | } //namespace |
| 177 | |
| 178 | Vector<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 | |
| 211 | Vector<String> gdre::get_recursive_dir_list(const String &p_dir, const Vector<String> &wildcards, bool absolute, bool include_hidden) { |
| 212 | Vector<String> ret; |