MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getExecutablePath

Method getExecutablePath

Engine/source/platformWin32/winFileio.cpp:915–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

913}
914
915StringTableEntry Platform::getExecutablePath()
916{
917#ifdef UNICODE
918 StringTableEntry path;
919 getExecutableInfo( &path, NULL );
920 return path;
921#else
922 static StringTableEntry cen = NULL;
923 if (!cen)
924 {
925 char cen_buf[2048];
926 GetModuleFileNameA( NULL, cen_buf, 2047);
927 forwardslash(cen_buf);
928
929 char *delimiter = dStrrchr( cen_buf, '/' );
930
931 if( delimiter != NULL )
932 *delimiter = 0x00;
933
934 cen = StringTable->insert(cen_buf);
935 }
936 return cen;
937#endif
938}
939
940//--------------------------------------
941bool Platform::isFile(const char *pFilePath)

Callers

nothing calls this directly

Calls 4

getExecutableInfoFunction · 0.85
forwardslashFunction · 0.70
dStrrchrFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected