Returns true if pathname describes a root directory. (Windows has one root directory per disk drive.)
| 9484 | // Returns true if pathname describes a root directory. (Windows has one |
| 9485 | // root directory per disk drive.) |
| 9486 | bool FilePath::IsRootDirectory() const { |
| 9487 | #if GTEST_OS_WINDOWS |
| 9488 | return pathname_.length() == 3 && IsAbsolutePath(); |
| 9489 | #else |
| 9490 | return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]); |
| 9491 | #endif |
| 9492 | } |
| 9493 | |
| 9494 | // Returns true if pathname describes an absolute path. |
| 9495 | bool FilePath::IsAbsolutePath() const { |
nothing calls this directly
no test coverage detected