MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / IsRootDirectory

Method IsRootDirectory

rtpose_wrapper/src/gtest/gtest-all.cpp:7673–7682  ·  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

7671// Returns true if pathname describes a root directory. (Windows has one
7672// root directory per disk drive.)
7673bool FilePath::IsRootDirectory() const {
7674#if GTEST_OS_WINDOWS
7675 // TODO(wan@google.com): on Windows a network share like
7676 // \\server\share can be a root directory, although it cannot be the
7677 // current directory. Handle this properly.
7678 return pathname_.length() == 3 && IsAbsolutePath();
7679#else
7680 return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);
7681#endif
7682}
7683
7684// Returns true if pathname describes an absolute path.
7685bool FilePath::IsAbsolutePath() const {

Callers

nothing calls this directly

Calls 1

IsPathSeparatorFunction · 0.85

Tested by

no test coverage detected