MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / Path_MakeAbsolute

Function Path_MakeAbsolute

samples/shared/pathtools.cpp:192–207  ·  view source on GitHub ↗

Makes an absolute path from a relative path and a base path */

Source from the content-addressed store, hash-verified

190
191/** Makes an absolute path from a relative path and a base path */
192std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath )
193{
194 if( Path_IsAbsolute( sRelativePath ) )
195 return sRelativePath;
196 else
197 {
198 if( !Path_IsAbsolute( sBasePath ) )
199 return "";
200
201 std::string sCompacted = Path_Compact( Path_Join( sBasePath, sRelativePath ) );
202 if( Path_IsAbsolute( sCompacted ) )
203 return sCompacted;
204 else
205 return "";
206 }
207}
208
209
210/** Fixes the directory separators for the current platform */

Callers 8

Path_FilePathToUrlFunction · 0.70
BInitMethod · 0.50
CreateAllShadersMethod · 0.50
SetupTexturemapsMethod · 0.50
BInitMethod · 0.50
SetupTexturemapsMethod · 0.50
CreateAllShadersMethod · 0.50
SetupTexturemapsMethod · 0.50

Calls 3

Path_IsAbsoluteFunction · 0.70
Path_CompactFunction · 0.70
Path_JoinFunction · 0.70

Tested by

no test coverage detected