MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getFileTimes

Method getFileTimes

engine/source/platformEmscripten/EmscriptenFileio.cpp:831–853  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

829
830//-----------------------------------------------------------------------------
831bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime)
832{
833 char pathName[MaxPath];
834
835 // if it starts with cwd, we need to strip that off so that we can look for
836 // the file in the pref dir
837 char cwd[MaxPath];
838 getcwd(cwd, MaxPath);
839 if (dStrstr(filePath, cwd) == filePath)
840 filePath = filePath + dStrlen(cwd) + 1;
841
842 // if its relative, first look in the pref dir
843 if (filePath[0] != '/' && filePath[0] != '\\')
844 {
845 MungePath(pathName, MaxPath, filePath, GetPrefDir());
846 if (GetFileTimes(pathName, createTime, modifyTime))
847 return true;
848 }
849
850 // here if the path is absolute or not in the pref dir
851 MungePath(pathName, MaxPath, filePath, cwd);
852 return GetFileTimes(pathName, createTime, modifyTime);
853}
854
855//-----------------------------------------------------------------------------
856bool Platform::createPath(const char *file)

Callers

nothing calls this directly

Calls 5

dStrstrFunction · 0.70
dStrlenFunction · 0.70
MungePathFunction · 0.70
GetPrefDirFunction · 0.70
GetFileTimesFunction · 0.70

Tested by

no test coverage detected