[Vala] I need help writing some function...
- From: Arkadi Viner <arkashkin gmail com>
- To: vala-list gnome org
- Subject: [Vala] I need help writing some function...
- Date: Tue, 4 Aug 2009 23:02:11 +0300
Hello.
I am trying to write some function that would append a line to a text file.
public static bool addLineToFile(string file_path, string line) {
var file = File.new_for_path (file_path);
if (!file.query_exists (null)){
stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
return false;
}
FileOutputStream file_stream =
GLib.File.append_to(file,FileCreateFlags.NONE,null,null);
///////////////////TO BE CONTINUED...////////////////////////
return true;
}
I know that the function is not finished yet, but why it doesn't compile?
If some one could give some sample code to do this function it will be great
because I can't find any good example
on the internet...
Thank you very much.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]