| 9 | IMPORT_FSTR(FS_app, PROJECT_DIR "/app/application.cpp") |
| 10 | |
| 11 | void listSpiffsPartitions() |
| 12 | { |
| 13 | Serial.println(_F("** Enumerate registered SPIFFS partitions")); |
| 14 | for(auto part : Storage::findPartition(Storage::Partition::SubType::Data::spiffs)) { |
| 15 | Serial << _F(">> Mounting '") << part.name() << "' ..." << endl; |
| 16 | bool ok = spiffs_mount(part); |
| 17 | Serial.println(ok ? "OK, listing files:" : "Mount failed!"); |
| 18 | if(!ok) { |
| 19 | continue; |
| 20 | } |
| 21 | |
| 22 | Directory dir; |
| 23 | if(dir.open()) { |
| 24 | while(dir.next()) { |
| 25 | Serial << " " << dir.stat().name << endl; |
| 26 | } |
| 27 | } |
| 28 | Serial << dir.count() << _F(" files found") << endl << endl; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | void printPart(Storage::Partition part) |
| 33 | { |
no test coverage detected