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

Function GetFileTimes

Engine/source/platformPOSIX/POSIXFileio.cpp:832–852  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

830
831//-----------------------------------------------------------------------------
832static bool GetFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime)
833{
834 struct stat fStat;
835
836 if (stat(filePath, &fStat) == -1)
837 return false;
838
839 if(createTime)
840 {
841 // no where does SysV/BSD UNIX keep a record of a file's
842 // creation time. instead of creation time I'll just use
843 // changed time for now.
844 *createTime = fStat.st_ctime;
845 }
846 if(modifyTime)
847 {
848 *modifyTime = fStat.st_mtime;
849 }
850
851 return true;
852}
853
854//-----------------------------------------------------------------------------
855bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime)

Callers 1

getFileTimesMethod · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected