Returns the current working directory, or "" if unsuccessful.
| 7525 | |
| 7526 | // Returns the current working directory, or "" if unsuccessful. |
| 7527 | FilePath 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 |
nothing calls this directly
no test coverage detected