But I guess I wonder what you're trying to do here? If you are writing the code you presumably know which type of file you're trying to create, so you'd know what to check for?
Given the issues around StorageFile I may end up ignoring them in .list at some point and moving to using .listSF or something, so checking for both types of file explicitly (if you have to) is probably the best option.
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.
The main issue here is the two distinct file types. If you want to check two you could do:
But I guess I wonder what you're trying to do here? If you are writing the code you presumably know which type of file you're trying to create, so you'd know what to check for?
Given the issues around StorageFile I may end up ignoring them in
.list
at some point and moving to using.listSF
or something, so checking for both types of file explicitly (if you have to) is probably the best option.