how can I determine how many files are open on the SD card?
Posted: Sun Jul 24, 2022 8:02 pm
well the subject is the question. I studied a lot. VFS driver etc. may be somebody knows the solution ?
ESP32 Official Forum
http://forum.esp32.com/
I am not aware of any function, but you can take one variable named index.Whenever you open file just increment the index pointer and when ever you closes the file just decrement the index pointer. Any time you can call the index which let you know the files open in the system.
There we go; your actual question would be something like 'How do I make sure the SD card filesystem is in a consistent state when I order a reboot, without modifying the code that accesses the files'?