I would like to list files store in SPIFFS partition. In Arduino world, I do this :
Code: Select all
Dir dir = SPIFFS.openDir("");
while (dir.next()) {
Serial.print(dir.fileName());
File f = dir.openFile("r");
Serial.println(f.size());
}
Code: Select all
Dir dir = SPIFFS.openDir("");
while (dir.next()) {
Serial.print(dir.fileName());
File f = dir.openFile("r");
Serial.println(f.size());
}
Code: Select all
DIR* dir = opendir("/spiffs/test");
if (dir == NULL) {
return;
}
while (true) {
struct dirent* de = readdir(dir);
if (!de) {
break;
}
printf("Found file: %s\n", de->d_name);
}
closedir(dir);
Users browsing this forum: Baidu [Spider] and 147 guests