-----------------------------------------------------------------------------
| 989 | |
| 990 | //----------------------------------------------------------------------------- |
| 991 | bool Platform::isFile(const char *pFilePath) |
| 992 | { |
| 993 | if (!pFilePath || !*pFilePath) |
| 994 | return false; |
| 995 | // Get file info |
| 996 | struct stat fStat; |
| 997 | if (stat(pFilePath, &fStat) < 0) |
| 998 | { |
| 999 | // Since file does not exist on disk see if it exists in a zip file loaded |
| 1000 | return Torque::FS::IsFile(pFilePath); |
| 1001 | } |
| 1002 | |
| 1003 | // if the file is a "regular file" then true |
| 1004 | if ( (fStat.st_mode & S_IFMT) == S_IFREG) |
| 1005 | return true; |
| 1006 | // must be some other file (directory, device, etc.) |
| 1007 | return false; |
| 1008 | } |
| 1009 | |
| 1010 | //----------------------------------------------------------------------------- |
| 1011 | S32 Platform::getFileSize(const char *pFilePath) |