Hi Jonathan,

Thanks, this was already quite useful, I think I just drop the whole
Gio-thing and use GLib instead.

On Wed, 24 Nov 2010 22:44:30 +0100
Jonatan Liljedahl <li...@kymatica.com> wrote:

> This works in seed:
> 
> GLib=imports.gi.GLib;
> GLib.file_get_contents("COPYING",x={});
> lines = x.contents.split("\n");

Your code works in Seed just fine, but interestingly, it fails so in
Gjs, because "Error: Failed to convert UTF-8 string to JS string:
Invalid byte sequence in conversion input"

And I think I prefer to read the file linewise, not to use too much
memory if not neccessary. But I saw something about GLib FileStreams,
so that might work just fine :)

regards,
Marek
_______________________________________________
javascript-list mailing list
javascript-list@gnome.org
http://mail.gnome.org/mailman/listinfo/javascript-list

Reply via email to