You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
Thanks for the extensive explanation, sounds like a perfect addition for the reference. It's clear for me now.
Coming from other languages it feels "natural" to start with an "open" command, so that's the reason why I chose
Storagefile
in the 1st place.This says it all!
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.
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})