Open mkeyno opened 2 years ago
Hello, sorry for answering late. Is this still valid?
@VojtechBartoska yes it is
Ok, linking this to grouped issue where we will investigate this more.
I think the issue here is that file.name()
returns the last component of the filename (compared to file.path()
which returns the complete path). At the same time, SPIFFS doesn't have a concept of directories, it's just that file names may contain forward slashes. SPIFFS class tries to pretend that directories actually exist (hence file.name()
returns something different from file.path()
) but doesn't quite get there.
At minimum we should document this behavior, issue tracking documentation updates is referenced above.
@igrr with ESP8266 object Dir works fine, but this object has depricated in new FS lib
@igrr Do you know of any workaround?
The best workaround is to use LittleFS. This is just one of the undesirable behaviors of SPIFFS.
Board
SparkFun MicroMod ESP32 Processor (FireBeatle in Arduino IDE)
Device Description
SparkFun MicroMod ESP32 Processor
alongside of SparkFun MicroMod Qwiic Carrier Board - Single
Hardware Configuration
no hardware is attached
Version
v2.0.2
IDE Name
Arduino IDE
Operating System
windows 10
Flash frequency
80MHz
PSRAM enabled
yes
Upload speed
115200
Description
I've tried to run the SPIFF_test sample library (framework-arduinoespressif32\libraries\SPIFFS\examples\SPIFFS_Test\SPIFFS_Test.ino) however, I noticed I can not create any file in the subdirectory even with adding some changes following is my code
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide