I'm not sure I understand - could you give an example?
If you call StorageFile.write 10000 times, writing one byte each time, it'll use just 3 files worth of data. The file number does not increment based on how many writes you're doing, it's based on how many 4k pages you're using.
The restriction on using 0xFF in StorageFile files is specifically so they can have that behaviour.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm not sure I understand - could you give an example?
If you call
StorageFile.write
10000 times, writing one byte each time, it'll use just 3 files worth of data. The file number does not increment based on how many writes you're doing, it's based on how many 4k pages you're using.The restriction on using 0xFF in
StorageFile
files is specifically so they can have that behaviour.