Ok, so, I know this sounds very stupid, but I can't for the life of me figure out how to open a subdirectory. I've mounted an SD-card which I can succesfully use to play and serve files. Furthermore, I have the following function.
Code: Select all
void list_files(const char * dirpath){
struct dirent *ep;
DIR *dp = opendir(dirpath);
if (dp != NULL){
while ((ep = readdir(dp)) != NULL) {
ESP_LOGI(TAG, "Found %s.", ep->d_name);
}
(void) closedir (dp);
} else {
ESP_LOGE(TAG, "Failed to open directory \'%s\'!", dirpath);
}
}
Code: Select all
list_files("/sdcard/")
Code: Select all
list_files("/sdcard/questions")
Am I overseeing something?
Kind regards,
Jochem