MCPcopy Create free account
hub / github.com/assaultcube/AC / execdir

Function execdir

source/src/command.cpp:1002–1015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000COMMANDF(execute, "s", (char *s) { intret(execute(s)); });
1001
1002void execdir(const char *dir)
1003{
1004 if(dir[0])
1005 {
1006 vector<char *> files;
1007 listfiles(dir, "cfg", files, stringsort);
1008 loopv(files)
1009 {
1010 defformatstring(d)("%s/%s.cfg",dir,files[i]);
1011 exec(d);
1012 delstring(files[i]);
1013 }
1014 }
1015}
1016COMMAND(execdir, "s");
1017
1018// below the commands that implement a small imperative language. thanks to the semantics of

Callers

nothing calls this directly

Calls 1

listfilesFunction · 0.85

Tested by

no test coverage detected