This has examples for Gio writing to files. - feel free to use it - it
should be ok on gjs.
http://git.roojs.org/?p=app.wkmirror;a=blob;f=File.js
There may be an issue that when gjs internally creates a javascript
string from the buffer, it trim's it at the \0 byte. which is why when I
was doing something similar for website mirroring, we had to pass arrays
of characters back and forth... (writeBinaryArray) in there.
Regards
Alan
On Thursday, February 14, 2013 03:10 AM, Micah Lee wrote:
I have one more related question, if you don't mind helping. I'm
successfully able to download the file in chunks and update the progress
bar, but I'm running into trouble trying to save the chunks to a file as
I get them.
The Soup.Buffer object confuses me, and I can't get the
Gio.FileOutputStream.write() method to write any data.
I posted another stackoverflow question with details:
http://stackoverflow.com/questions/14861056/with-gjs-how-can-i-write-soup-buffer-chunks-of-data-to-a-file
Thanks!
_______________________________________________
javascript-list mailing list
javascript-list@gnome.org
https://mail.gnome.org/mailman/listinfo/javascript-list
_______________________________________________
javascript-list mailing list
javascript-list@gnome.org
https://mail.gnome.org/mailman/listinfo/javascript-list