GLib.KeyFile.prototype.save_to_file

function save_to_file(filename: String): Boolean {
    // Gjs wrapper for g_key_file_save_to_file()
}
  

Writes the contents of key_file to filename using GLib.file_set_contents.

This function can fail for any of the reasons that GLib.file_set_contents may fail.

Since 2.40

filename

the name of the file to write to

Returns

true if successful, else false with @error set