Hello, I would like to get image names from Resource folder. (For textures caching)
Currently I have this, and it is working on iOS but not on Android. I would like to ask if it is possible to use something similar for Android? (changing path or somethig)
/* Find all images */
DIR *dir;
struct dirent *ent;
if ((dir = opendir (directoryPath.c_str())) != NULL) {
/* print all the files and directories within directory */
while ((ent = readdir (dir)) != NULL) {
std::string fileName = ent->d_name;
if(fileName.substr(fileName.find_last_of(".") + 1) == "png") {
log("%s", fileName.c_str());
}
}
closedir (dir);
} else {
/* could not open directory */
perror ("");
}