-----------------------------------------------------------------------------
| 806 | |
| 807 | //----------------------------------------------------------------------------- |
| 808 | static 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 | //----------------------------------------------------------------------------- |
| 831 | bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime) |