MCPcopy Create free account
hub / github.com/apache/singa / GetCurrentDir

Method GetCurrentDir

test/gtest/gtest-all.cc:7935–7947  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

7933
7934// Returns the current working directory, or "" if unsuccessful.
7935FilePath FilePath::GetCurrentDir() {
7936#if GTEST_OS_WINDOWS_MOBILE
7937 // Windows CE doesn't have a current directory, so we just return
7938 // something reasonable.
7939 return FilePath(kCurrentDirectoryString);
7940#elif GTEST_OS_WINDOWS
7941 char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
7942 return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
7943#else
7944 char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
7945 return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
7946#endif // GTEST_OS_WINDOWS_MOBILE
7947}
7948
7949// Returns a copy of the FilePath with the case-insensitive extension removed.
7950// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns

Callers

nothing calls this directly

Calls 1

FilePathFunction · 0.85

Tested by

no test coverage detected