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

Method IsAbsolutePath

rtpose_wrapper/src/gtest/gtest-all.cpp:7685–7696  ·  view source on GitHub ↗

Returns true if pathname describes an absolute path.

Source from the content-addressed store, hash-verified

7683
7684// Returns true if pathname describes an absolute path.
7685bool FilePath::IsAbsolutePath() const {
7686 const char* const name = pathname_.c_str();
7687#if GTEST_OS_WINDOWS
7688 return pathname_.length() >= 3 &&
7689 ((name[0] >= 'a' && name[0] <= 'z') ||
7690 (name[0] >= 'A' && name[0] <= 'Z')) &&
7691 name[1] == ':' &&
7692 IsPathSeparator(name[2]);
7693#else
7694 return IsPathSeparator(name[0]);
7695#endif
7696}
7697
7698// Returns a pathname for a file that does not currently exist. The pathname
7699// will be directory/base_name.extension or

Callers 1

Calls 1

IsPathSeparatorFunction · 0.85

Tested by

no test coverage detected