Recursively yields relative pathnames inside a literal directory.
| 331 | |
| 332 | // Recursively yields relative pathnames inside a literal directory. |
| 333 | Vector<String> rlistdir(const String &dirname, bool dironly, bool include_hidden) { |
| 334 | Vector<String> result; |
| 335 | |
| 336 | auto names = iter_directory(dirname, dironly, include_hidden); |
| 337 | for (auto &x : names) { |
| 338 | result.push_back(x); |
| 339 | for (auto &y : rlistdir(x, dironly, include_hidden)) { |
| 340 | if (!dirname.is_absolute_path()) { |
| 341 | y = x.path_join(y); |
| 342 | } |
| 343 | result.push_back(y); |
| 344 | } |
| 345 | } |
| 346 | return result; |
| 347 | } |
| 348 | |
| 349 | // This helper function recursively yields relative pathnames inside a literal |
| 350 | // directory. |
no test coverage detected