-----------------------------------------------------------------------------
| 935 | |
| 936 | //----------------------------------------------------------------------------- |
| 937 | bool Platform::hasSubDirectory(const char *path) |
| 938 | { |
| 939 | if (isCachePath(path) || isUserDataPath(path)) |
| 940 | { |
| 941 | DIR *dir; |
| 942 | dirent *entry; |
| 943 | |
| 944 | dir = opendir(path); |
| 945 | if(!dir) |
| 946 | return false; // we got a bad path, so no, it has no subdirectory. |
| 947 | |
| 948 | while( true ) |
| 949 | { |
| 950 | entry = readdir(dir); |
| 951 | if ( entry == NULL ) |
| 952 | break; |
| 953 | |
| 954 | if(isGoodDirectoryCache(entry) ) |
| 955 | { |
| 956 | closedir(dir); |
| 957 | return true; // we have a subdirectory, that isnt on the exclude list. |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | closedir(dir); |
| 962 | return false; // either this dir had no subdirectories, or they were all on the exclude list. |
| 963 | |
| 964 | } |
| 965 | |
| 966 | android_InitDirList(path); |
| 967 | char dir[80]; |
| 968 | char pdir[255]; |
| 969 | strcpy(dir,""); |
| 970 | android_GetNextDir(path, dir); |
| 971 | while(strcmp(dir,"") != 0) |
| 972 | { |
| 973 | sprintf(pdir, "%s/%s", path, dir); |
| 974 | if (isGoodDirectory(pdir)) |
| 975 | return true; |
| 976 | android_GetNextDir(path, dir); |
| 977 | } |
| 978 | |
| 979 | return false; |
| 980 | } |
| 981 | |
| 982 | //----------------------------------------------------------------------------- |
| 983 | /*bool recurseDumpDirectories(const char *basePath, const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath) |
nothing calls this directly
no test coverage detected