Opening file 6
BRIEF: SPIFFS can have 5 files open. On the 6th, SPIFFS.open() still returns a valid file handle. If I use available() or size() on the handle, I get zero. The problem is the code can't tell if the zero is because its the 6th file or the file is zero length. How can the code tell the difference?
DETAILS: My code is rather multi-threaded (all be it... co-operative multi-threaded) and its set up to return control and the next time through, if there is an available file spot, it can then open and process the file.
As work arounds, I could: (1) Make a file counter and not let it get to 6. Unfortunately, files might be opened by users outside of my class. (2) Write some code to make sure the end-users don't load some zero length files. Again, it can be bypassed.
Both seem rather a kludge - Any suggestions?