-----------------------------------------------------------------------------
| 829 | |
| 830 | //----------------------------------------------------------------------------- |
| 831 | bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime *modifyTime) |
| 832 | { |
| 833 | char pathName[MaxPath]; |
| 834 | |
| 835 | // if it starts with cwd, we need to strip that off so that we can look for |
| 836 | // the file in the pref dir |
| 837 | char cwd[MaxPath]; |
| 838 | getcwd(cwd, MaxPath); |
| 839 | if (dStrstr(filePath, cwd) == filePath) |
| 840 | filePath = filePath + dStrlen(cwd) + 1; |
| 841 | |
| 842 | // if its relative, first look in the pref dir |
| 843 | if (filePath[0] != '/' && filePath[0] != '\\') |
| 844 | { |
| 845 | MungePath(pathName, MaxPath, filePath, GetPrefDir()); |
| 846 | if (GetFileTimes(pathName, createTime, modifyTime)) |
| 847 | return true; |
| 848 | } |
| 849 | |
| 850 | // here if the path is absolute or not in the pref dir |
| 851 | MungePath(pathName, MaxPath, filePath, cwd); |
| 852 | return GetFileTimes(pathName, createTime, modifyTime); |
| 853 | } |
| 854 | |
| 855 | //----------------------------------------------------------------------------- |
| 856 | bool Platform::createPath(const char *file) |
nothing calls this directly
no test coverage detected