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

Method getFileTimes

Engine/source/platformPOSIX/POSIXFileio.cpp:855–877  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

853
854//-----------------------------------------------------------------------------
855bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime)
856{
857 char pathName[MaxPath];
858
859 // if it starts with cwd, we need to strip that off so that we can look for
860 // the file in the pref dir
861 char cwd[MaxPath];
862 getcwd(cwd, MaxPath);
863 if (dStrstr(filePath, cwd) == filePath)
864 filePath = filePath + dStrlen(cwd) + 1;
865
866 // if its relative, first look in the pref dir
867 if (filePath[0] != '/' && filePath[0] != '\\')
868 {
869 MungePath(pathName, MaxPath, filePath, GetPrefDir());
870 if (GetFileTimes(pathName, createTime, modifyTime))
871 return true;
872 }
873
874 // here if the path is absolute or not in the pref dir
875 MungePath(pathName, MaxPath, filePath, cwd);
876 return GetFileTimes(pathName, createTime, modifyTime);
877}
878
879//-----------------------------------------------------------------------------
880bool Platform::createPath(const char *file)

Callers

nothing calls this directly

Calls 5

dStrstrFunction · 0.85
MungePathFunction · 0.85
GetPrefDirFunction · 0.85
GetFileTimesFunction · 0.85
dStrlenFunction · 0.50

Tested by

no test coverage detected