Saving and loading files in javascript [SOLVED]

How can I save and load files from within a javascript block? I’ve tried using gdjs.fileSystem, but couldn’t seem to get it to work. Any help would be much appreciated.

I managed to accomplish this by using the path and filesystem modules in my own functions.