MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / applicationDirPath

Method applicationDirPath

Global/ProcInfo.cpp:453–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453std::string
454ProcInfo::applicationDirPath(const char* argv0Param)
455{
456
457 std::string filePath = ProcInfo::applicationFilePath(argv0Param);
458 std::size_t foundSlash = filePath.find_last_of('/');
459
460 if (foundSlash == std::string::npos) {
461#ifdef __NATRON_WIN32__
462 foundSlash = filePath.find_last_of('\\');
463 if (foundSlash == std::string::npos) {
464 return std::string();
465 }
466#else
467 return std::string();
468#endif
469 }
470
471 return filePath.substr(0, foundSlash);
472}
473
474
475bool

Callers 1

initInternalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected