I'll update the reference, but as @fanoush says, StorageFile is built on top of the standard storage functionality, which makes it harder to separate the two.
Normal Storage functions are what I'd recommend you use for basically everything unless you intend to append textual data (eg a log file). They're much more efficient to write and read.
StorageFile exists because on Bangle.js especially there's a need to log data (GPS readings, heart rate, etc) and using fixed-size files for that is a complete pain.
Maybe there should be Storage.list and StorageFile.list?
The issue is StorageFile is really only something you create with require("Storage").open. So probably it's going to end up being require("Storage").listSF or require("Storage").list({storageFile:true})
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'll update the reference, but as @fanoush says, StorageFile is built on top of the standard storage functionality, which makes it harder to separate the two.
Normal
Storage
functions are what I'd recommend you use for basically everything unless you intend to append textual data (eg a log file). They're much more efficient to write and read.StorageFile
exists because on Bangle.js especially there's a need to log data (GPS readings, heart rate, etc) and using fixed-size files for that is a complete pain.The issue is
StorageFile
is really only something you create withrequire("Storage").open
. So probably it's going to end up beingrequire("Storage").listSF
orrequire("Storage").list({storageFile:true})