-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed

Description
Device: ESP32-WROOM32
IDE: Arduino 1.8.4
OS: Mac OS
It seems like SPIFFS can open (read) a file, that is not existing..
#include "FS.h"
#include "SPIFFS.h"
void setup() {
Serial.begin(9600);
delay(1000);
Serial.println("Mounting FS...");
while (!SPIFFS.begin(true))
{
Serial.println("Failed to mount file system, formatted");
delay(5000);
}
SPIFFS.remove("/somefile.txt");
delay(1000);
File configFile = SPIFFS.open("/somefile.txt","r");
if (!configFile)
{
Serial.println("Failed to open config file");
}
else
{
Serial.println("File Opened");
}
}
void loop() {
// put your main code here, to run repeatedly:
}
Output:
Mounting FS...
File Opened
Metadata
Metadata
Assignees
Labels
No labels