MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / GetCurrentDir

Method GetCurrentDir

rtpose_wrapper/src/gtest/gtest-all.cpp:7527–7539  ·  view source on GitHub ↗

Returns the current working directory, or "" if unsuccessful.

Source from the content-addressed store, hash-verified

7525
7526// Returns the current working directory, or "" if unsuccessful.
7527FilePath FilePath::GetCurrentDir() {
7528#if GTEST_OS_WINDOWS_MOBILE
7529 // Windows CE doesn't have a current directory, so we just return
7530 // something reasonable.
7531 return FilePath(kCurrentDirectoryString);
7532#elif GTEST_OS_WINDOWS
7533 char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
7534 return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
7535#else
7536 char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
7537 return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
7538#endif // GTEST_OS_WINDOWS_MOBILE
7539}
7540
7541// Returns a copy of the FilePath with the case-insensitive extension removed.
7542// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns

Callers

nothing calls this directly

Calls 1

FilePathFunction · 0.85

Tested by

no test coverage detected