Hi. I couldn't find a fs.deleteFile() or something similar in the docs. Do i have to use a other lib than require("fs") to delete a file or directory from sd-card?
I'd guess that it's not implemented yet. Lots of things aren't 100% done on the Espruino.
What's your use case, if you don't mind me asking? SD cards are just so massive compared to the amounts of data the Espruino works with (5 orders of magnitude larger), I have to wonder what you're doing where you'd have a desire to delete files.
Hi DrAzzy, i've written a very simple web service for the espruino & CC3000 and a little filesystem based db that uses the sd-card as its storage. So when my web service adds data to the db it writes a file and when it removes data from the db it needs to delete the corresponding file from the sd-card. Its simple and slow but it works great. Except for the delete.
Aaah, cool - that's a neat idea, I hadn't really thought about making that sort of thing on the Espruino. Good luck!
I think it's a bit unfair to say 'Lots of things aren't 100% done'. The entire node.js file API is never going to be implemented and that was never the plan. It's just not possible to get all the functionality of all the libraries into a very small chip.
It was only a small addition, so i've stuck it in. It'll be in 1v52, or in http://www.espruino.com/binaries/git/commits/7c73883e1d7d4e2d677e5357f8da091e4ddf967e in around an hour when the automatic build finishes.
I am more than happy with this little board and its JS implementation. It does more than i have ever expected and it is rock solid. And the best thing is that if i stumble across a "minor" problem and post it to this forum Gordon is there and fixes it faster than i can update my board. So thank you very much Gordon for this great support.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem