MCPcopy Create free account
hub / github.com/Singular/Singular / CurrentDir

Function CurrentDir

ppcc/adlib/os.cc:199–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199Str *CurrentDir() {
200#ifdef PATH_MAX
201 char *path = getcwd(NULL, PATH_MAX);
202#else
203 char *path = getcwd(NULL, 8192);
204#endif
205 Str *result = new Str(path);
206 free(path);
207 return result;
208}
209
210bool ChDir(const char *path) {
211 return !chdir(path);

Callers 2

MainFunction · 0.85
AbsolutePathFunction · 0.85

Calls 1

freeFunction · 0.85

Tested by 1

MainFunction · 0.68