MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / IsRootDirectory

Method IsRootDirectory

tests/external/gmock-1.7.0/gtest/src/gtest-filepath.cc:248–257  ·  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

246// Returns true if pathname describes a root directory. (Windows has one
247// root directory per disk drive.)
248bool FilePath::IsRootDirectory() const {
249#if GTEST_OS_WINDOWS
250 // TODO(wan@google.com): on Windows a network share like
251 // \\server\share can be a root directory, although it cannot be the
252 // current directory. Handle this properly.
253 return pathname_.length() == 3 && IsAbsolutePath();
254#else
255 return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);
256#endif
257}
258
259// Returns true if pathname describes an absolute path.
260bool FilePath::IsAbsolutePath() const {

Callers 1

TESTFunction · 0.45

Calls 1

IsPathSeparatorFunction · 0.70

Tested by

no test coverage detected