-----------------------------------------------------------------------------
| 944 | |
| 945 | //----------------------------------------------------------------------------- |
| 946 | bool Platform::isDirectory(const char *pDirPath) |
| 947 | { |
| 948 | if (!pDirPath || !*pDirPath) |
| 949 | return false; |
| 950 | |
| 951 | // Get file info |
| 952 | struct stat fStat; |
| 953 | if (stat(pDirPath, &fStat) < 0) |
| 954 | return false; |
| 955 | |
| 956 | // if the file is a Directory then true |
| 957 | if ( (fStat.st_mode & S_IFMT) == S_IFDIR) |
| 958 | return true; |
| 959 | |
| 960 | return false; |
| 961 | } |
| 962 | |
| 963 | //----------------------------------------------------------------------------- |
| 964 | bool Platform::isSubDirectory(const char *pParent, const char *pDir) |