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

Function GetFileTimes

engine/source/platformEmscripten/EmscriptenFileio.cpp:808–828  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

806
807//-----------------------------------------------------------------------------
808static bool GetFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime)
809{
810 struct stat fStat;
811
812 if (stat(filePath, &fStat) == -1)
813 return false;
814
815 if(createTime)
816 {
817 // no where does SysV/BSD UNIX keep a record of a file's
818 // creation time. instead of creation time I'll just use
819 // changed time for now.
820 *createTime = fStat.st_ctime;
821 }
822 if(modifyTime)
823 {
824 *modifyTime = fStat.st_mtime;
825 }
826
827 return true;
828}
829
830//-----------------------------------------------------------------------------
831bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime)

Callers 1

getFileTimesMethod · 0.70

Calls 1

statClass · 0.70

Tested by

no test coverage detected