Yes, that's expected. As you write more, you'll get a \2/etc. It's to allow the file to grow in size past that which is originally allocated. The files aren't really readable in the same way as other files.
I'll add something to the StorageFile docs.
so the generated documentation needs refresh?
The generated docs match the current stable firmware release - and .open is in one of the cutting edge builds :)
you should not write character code 255
It might - but honestly if you're writing binary files rather than text you're probably more likely to have read the docs and seen that. If you can think of other solutions for this I'm happy to look at them, but this seemed like the most stable way of handling 'growing' a file.
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.
Yes, that's expected. As you write more, you'll get a
\2
/etc. It's to allow the file to grow in size past that which is originally allocated. The files aren't really readable in the same way as other files.I'll add something to the
StorageFile
docs.The generated docs match the current stable firmware release - and
.open
is in one of the cutting edge builds :)It might - but honestly if you're writing binary files rather than text you're probably more likely to have read the docs and seen that. If you can think of other solutions for this I'm happy to look at them, but this seemed like the most stable way of handling 'growing' a file.