-----------------------------------------------------------------------------
| 1025 | |
| 1026 | //----------------------------------------------------------------------------- |
| 1027 | bool Platform::isDirectory(const char *pDirPath) |
| 1028 | { |
| 1029 | if (!pDirPath || !*pDirPath) |
| 1030 | return false; |
| 1031 | |
| 1032 | // Get file info |
| 1033 | struct stat fStat; |
| 1034 | if (stat(pDirPath, &fStat) < 0) |
| 1035 | return false; |
| 1036 | |
| 1037 | // if the file is a Directory then true |
| 1038 | if ( (fStat.st_mode & S_IFMT) == S_IFDIR) |
| 1039 | return true; |
| 1040 | |
| 1041 | return false; |
| 1042 | } |
| 1043 | |
| 1044 | //----------------------------------------------------------------------------- |
| 1045 | bool Platform::isSubDirectory(const char *pParent, const char *pDir) |