Re: [Vala] Writing to existing file



Jürg Billeter wrote:
On Sun, 2009-05-31 at 11:36 +0200, Joss 4 wrote:
What I want is to change this line var file_stream = file.create (FileCreateFlags.NONE, null); to something like var file_stream = file.open (); var data_stream = new DataOutputStream (file_stream);

How can I accomplish this ?

Take a look at GLib.File.append_to[1][2].

Jürg

[1] http://valadoc.org/?pkg=gio-2.0&element=GLib.File.append_to
[2] http://library.gnome.org/devel/gio/stable/GFile.html#g-file-append-to
Thank you Jurg,
I gave a little look at the links you post me, but I don't want only append data but update ; I mean seek , read data record and write. It's up to me if set current file pointer to current or end.
Could I do this ? and how ?





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