SPIFFS doesn't work anymore
Posted: Wed Nov 07, 2018 4:01 pm
Hey guys,
I'm working with an ESP32 and need to write some files there.
but the problem is, SPIFFS doesn't work anymore.
I used SPIFFS_Test from Examples or this code:
But I got just "FAILED ERROR."
What could be the reason?
I'm working with an ESP32 and need to write some files there.
but the problem is, SPIFFS doesn't work anymore.
I used SPIFFS_Test from Examples or this code:
Code: Select all
#include "SPIFFS.h"
void setup() {
Serial.begin(115200);
if (!SPIFFS.begin(true)) {
Serial.println("An Error has occurred while mounting SPIFFS");
return;
}
File file = SPIFFS.open("/test.txt", FILE_WRITE);
if (!file) {
Serial.println("There was an error opening the file for writing");
return;
}
if (file.print("TEST")) {
Serial.println("File was written");
} else {
Serial.println("File write failed");
}
file.close();
Serial.println(SPIFFS.exists("/test.txt"));
Serial.println(SPIFFS.exists("/nonexisting.txt"));
}
void loop() {}
What could be the reason?