MCPcopy Index your code
hub / github.com/assaultcube/AC / listdirsrecursive

Function listdirsrecursive

source/src/stream.cpp:467–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467void listdirsrecursive(const char *dir, vector<char *> &subdirs, int level)
468{
469 if(level > 8) return; // 8 levels is insane enough...
470 vector<char *> dirs;
471 listsubdirs(dir, dirs, stringsort);
472 loopv(dirs)
473 {
474 if(dirs[i][0] != '.') // ignore "." and ".." (and also other directories starting with '.', like it is unix-convention - and doesn't hurt on windows)
475 {
476 defformatstring(name)("%s/%s", dir, dirs[i]);
477 subdirs.add(newstring(name));
478 listdirsrecursive(name, subdirs, level + 1);
479 }
480 delstring(dirs[i]);
481 }
482}
483#endif
484
485bool delfile(const char *path)

Callers 2

loopvFunction · 0.85
loadallmapmodelsFunction · 0.85

Calls 1

listsubdirsFunction · 0.85

Tested by

no test coverage detected