MCPcopy Create free account
hub / github.com/apple/foundationdb / getWorkingDirectory

Function getWorkingDirectory

flow/Platform.actor.cpp:3053–3062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3051#define getcwd(buf, maxlen) _getcwd(buf, maxlen)
3052#endif
3053std::string getWorkingDirectory() {
3054 char* buf;
3055 if ((buf = getcwd(nullptr, 0)) == nullptr) {
3056 TraceEvent(SevWarnAlways, "GetWorkingDirectoryError").GetLastError();
3057 throw platform_error();
3058 }
3059 std::string result(buf);
3060 free(buf);
3061 return result;
3062}
3063
3064} // namespace platform
3065

Callers 5

abspathFunction · 0.85
Platform.actor.cppFile · 0.85
mainFunction · 0.85
_startMethod · 0.85

Calls 1

TraceEventClass · 0.85

Tested by 1

_startMethod · 0.68