I am trying to remove a file from an ESP8266. It's not working.
#include "FS.h"
void setup() {
Serial.begin(9600);
delay (10000);
SPIFFS.remove("/mvars.cfg");
File varf = SPIFFS.open ("/mvars.cfg", "w");
varf.close ();
varf = SPIFFS.open ("/mvars.cfg", "r");
if (!varf) {
Serial.print("File mars.cfg is there");
}
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Exit program, remove complete");
delay(8000);
}