Write string to file with 3.6



Hi there.

I'm trying to update my extension for 3.6
Here is my old code :

let f = Gio.file_new_for_path(file);
let out = f.replace(null, false, Gio.FileCreateFlags.NONE, null);
Shell.write_string_to_stream (out, content);

This code work perfectly with 3.4 but not 3.6. A file is created in the extension folder with name ".goutputstream-XXXXXX" instead of write on file.
Same problem with :

replace_contents(content);

What I'm doing wrong ?
Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]