-----------------------------------------------------------------------------
| 911 | |
| 912 | //----------------------------------------------------------------------------- |
| 913 | bool Platform::isFile(const char *pFilePath) |
| 914 | { |
| 915 | if (!pFilePath || !*pFilePath) |
| 916 | return false; |
| 917 | // Get file info |
| 918 | struct stat fStat; |
| 919 | if (stat(pFilePath, &fStat) < 0) |
| 920 | return false; |
| 921 | |
| 922 | // if the file is a "regular file" then true |
| 923 | if ( (fStat.st_mode & S_IFMT) == S_IFREG) |
| 924 | return true; |
| 925 | // must be some other file (directory, device, etc.) |
| 926 | return false; |
| 927 | } |
| 928 | |
| 929 | //----------------------------------------------------------------------------- |
| 930 | S32 Platform::getFileSize(const char *pFilePath) |