• When I started using Espruino a few weeks ago, I was "fresh" re. Espruino. I found the extensive description really confusing. So I just picked one.

    Now being a somewhat "less fresh" user I still wonder why there are 2 different file types. I read and reread the documentation, and still have no idea why the differences. It's probably me .....

    Just making sure, my posts were not meant as a gripe, but an attempt to add to the discusion that @MaBe kicked of.

  • I still wonder why there are 2 different file types

    The 'more advanced' one is done via basic one. The basic one has less overhead but cannot append to existing file. See also https://www.espruino.com/Reference#Stora­geFile
    So if you just write once or know how many bytes you will write in advance and will write it in chunks you don't need extra features StorageFile gives you. Also with Storage.write you will have continuous block so you can take direct memory pointer of that so Storage.write is more low level.

    Given the issues around StorageFile I may end up ignoring them in .list at some point

    Maybe there should be Storage.list and StorageFile.list?


Avatar for gerardwr @gerardwr started