Skip to content

Commit

Permalink
Use LittleFS for ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoGarcia committed Apr 5, 2022
1 parent 0b7e30f commit 12ceeec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
5 changes: 0 additions & 5 deletions src/ESPFS.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
#ifdef ESP32
#include <SPIFFS.h>
#define ESPFS SPIFFS
#elif defined(ESP8266)
#include <LittleFS.h>
#define ESPFS LittleFS
#endif
6 changes: 1 addition & 5 deletions src/FactoryResetService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ void FactoryResetService::handleRequest(AsyncWebServerRequest* request) {
*/
void FactoryResetService::factoryReset() {
#ifdef ESP32
File root = fs->open(FS_CONFIG_DIRECTORY);
File file;
while (file = root.openNextFile()) {
fs->remove(file.name());
}
fs->rmdir(FS_CONFIG_DIRECTORY);
#elif defined(ESP8266)
Dir configDirectory = fs->openDir(FS_CONFIG_DIRECTORY);
while (configDirectory.next()) {
Expand Down

0 comments on commit 12ceeec

Please sign in to comment.