We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f5b3c0 commit 17065dfCopy full SHA for 17065df
libraries/SPIFFS/examples/SPIFFS_Test/SPIFFS_Test.ino
@@ -1,6 +1,11 @@
1
#include "FS.h"
2
#include "SPIFFS.h"
3
4
+/* You only need to format SPIFFS the first time you run a
5
+ test or else use the SPIFFS plugin to create a partition
6
+ https://github.com/me-no-dev/arduino-esp32fs-plugin */
7
+#define FORMAT_SPIFFS_IF_FAILED true
8
+
9
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
10
Serial.printf("Listing directory: %s\r\n", dirname);
11
@@ -151,7 +156,7 @@ void testFileIO(fs::FS &fs, const char * path){
151
156
152
157
void setup(){
153
158
Serial.begin(115200);
154
- if(!SPIFFS.begin()){
159
+ if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)){
155
160
Serial.println("SPIFFS Mount Failed");
161
return;
162
}
0 commit comments