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

Method getFileTimes

engine/source/platformAndroid/AndroidFileio.cpp:675–698  ·  view source on GitHub ↗

----------------------------------------------------------------------------- either time param COULD be null. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

673// either time param COULD be null.
674//-----------------------------------------------------------------------------
675bool Platform::getFileTimes(const char *path, FileTime *createTime, FileTime *modifyTime)
676{
677 // MacOSX is NOT guaranteed to be running off a HFS volume,
678 // and UNIX does not keep a record of a file's creation time anywhere.
679 // So instead of creation time we return changed time,
680 // just like the Linux platform impl does.
681 if (!path || !*path)
682 return false;
683
684 struct stat statData;
685
686 if (stat(path, &statData) == -1)
687 return false;
688
689 if(createTime)
690 *createTime = statData.st_ctime;
691
692 if(modifyTime)
693 *modifyTime = statData.st_mtime;
694
695 return true;
696
697
698}
699
700
701//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

statClass · 0.70

Tested by

no test coverage detected