1563125887
kd@ 7/14/2019

Writing to a file in gjs

Not hard if you know what to do-

#!/usr/bin/env gjs                                                                                 
                                                                                                   
const Gio = imports.gi.Gio                                                                         
                                                                                                   
const file = Gio.File.new_for_path('/tmp/testfile')                                                
                                                                                                   
file.replace_contents("test text please ignore\n", null, false, 0, null)