MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / IsRootDirectory

Method IsRootDirectory

tests/gtest/gtest-all.cc:9486–9492  ·  view source on GitHub ↗

Returns true if pathname describes a root directory. (Windows has one root directory per disk drive.)

Source from the content-addressed store, hash-verified

9484// Returns true if pathname describes a root directory. (Windows has one
9485// root directory per disk drive.)
9486bool 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.
9495bool FilePath::IsAbsolutePath() const {

Callers

nothing calls this directly

Calls 1

IsPathSeparatorFunction · 0.85

Tested by

no test coverage detected