read after EOF: "undefined"
>>>> file does not look as expected
>>>> expected "Welcome"
>>>> got "Hello, World!"
>>>> file does not look as expected
>>>> expected "Welcome, World!"
>>>> got "Hello, World!"
>>>> file does not look as expected
>>>> expected "Welcome, World!
Here I am!"
>>>> got "Hello, World!"
finished
which basically means that an existing file can not be overwritten using Storage.open(filename,'w') followed by file.write(newcontent).
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.
Sorry for bothering you - but I am completely unable to get even simple file operations working.
The following code
produces this output
which basically means that an existing file can not be overwritten using
Storage.open(filename,'w')
followed byfile.write(newcontent)
.Does anybody see what I'm doing wrong?