OK, thanks, but all of my files have a .txt extension, and those are not recognised by your code :(
s = require('Storage'); print(s.list()); filename = 'news.txt'; if (s.read(filename)!==undefined) { print("exists"); } else { print("does not exists"); }
Output is:
[ "news.txt\1", "weath0.txt\1", "weath1.txt\1", "stocks.txt\1", "messages.txt\1" ] does not exists
@gerardwr started
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.
OK, thanks, but all of my files have a .txt extension, and those are not recognised by your code :(
Output is: