MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / GetAbsolutePath

Method GetAbsolutePath

DAEValidator/library/src/PathUtil.cpp:147–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 string Path::GetAbsolutePath(const std::string & path)
148 {
149 if (path.empty())
150 return GetWorkingDirectory();
151
152 if (path == ".")
153 return GetWorkingDirectory();
154
155 if (String::StartsWith(path, "/"))
156 return RemoveDotSegments(path);
157
158#if defined(_WIN32)
159 if (isalpha(path[0]) && path.substr(1, 2) == ":\\")
160 return RemoveDotSegments(path);
161#endif
162
163 return RemoveDotSegments(Join(GetWorkingDirectory(), path));
164 }
165
166 static const string dot(".");
167 static const string dot_dot("..");

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected