I am working on an application in which I save SSID passwords to individual files on the ESP8266 using rESP8266FileSystem.
During development I appear to have accidentally created a file with a null file name which is 8 bytes long, in addition to another valid file as indicated by the result when I run
Listing password files:
Name: , Size: 8
Name: Telstra1943, Size: 8
Having a null file name apparently means this code
fails or at least doesn't delete the file.
Any suggestions as to how I can clear the files from the flash - it doesn't matter if I have to delete any valid files in the process because I can recreate those once the filesystem is purged.
Thanks in anticipation of suggestions.
During development I appear to have accidentally created a file with a null file name which is 8 bytes long, in addition to another valid file as indicated by the result when I run
B4X:
Sub ListFiles
Log("Listing password files:")
For Each f As File In fs.ListFiles("")
Log("Name: ", f.Name, ", Size: ", f.Size)
Next
End Sub
Listing password files:
Name: , Size: 8
Name: Telstra1943, Size: 8
Having a null file name apparently means this code
B4X:
For Each f As File In fs.ListFiles("")
fs.Remove(f.Name)
Next
fails or at least doesn't delete the file.
Any suggestions as to how I can clear the files from the flash - it doesn't matter if I have to delete any valid files in the process because I can recreate those once the filesystem is purged.
Thanks in anticipation of suggestions.