Nope, now it's breaking!
As you say, doing a readdir just before is enough to kill it. But readdir followed by a readFile is fine.
readdir
readFile
>require("fs").readFile("Juergen1_data.bin") ="Hello World" >require("fs").statSync("Juergen1_data.bin") ={ "size": 11, "dir": false, "mtime": { "ms": 1328054400000 } } >require("fs").readdir() =[ "Juergen.json", "Juergen1_ctrl.json", "Juerget1_data.bin", "Juergen1_data.bin", "Juerget1_data.bin~" ] >require("fs").statSync("Juergen1_data.bin")
Looks like this is something else dodgy in the SPI/Filesystem interface code :(
@Gordon 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.
Nope, now it's breaking!
As you say, doing a
readdir
just before is enough to kill it. Butreaddir
followed by areadFile
is fine.Looks like this is something else dodgy in the SPI/Filesystem interface code :(