Last active
August 29, 2015 14:01
-
-
Save felipeborges/52d1abb30c246c73c6d1 to your computer and use it in GitHub Desktop.
Bug in GFile.replace_contents_async
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ByteArray = imports.byteArray; | |
const Gio = imports.gi.Gio; | |
const Lang = imports.lang; | |
const Mainloop = imports.mainloop; | |
let byteArray = ByteArray.fromString('lala');; | |
let file = Gio.file_new_for_path("output.json"); | |
file.replace_contents_async(byteArray, null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, null, | |
Lang.bind(this, function() { | |
log("bye!"); | |
})); | |
Mainloop.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment