[Vala] Load GLib.KeyFile from Glib.File
- From: Satyajit Sahoo <satyajit happy gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] Load GLib.KeyFile from Glib.File
- Date: Thu, 27 Dec 2012 17:11:52 +0530
Hi all. I'm very much noob in Vala. So forgive me if i'm asking anything
noob.
I'm trying to use the GLib.KeyFile to load a .ini file in my Vala program.
It loads fine if I use,
*key_file.load_from_file ("**elegance-colors.ini**", KeyFileFlags.NONE);*
But I want something like this,
*config_dir = File.new_for_path (Environment.get_user_config_dir ());*
* config_file = config_dir.get_child ("elegance-colors").get_child
("elegance-colors.ini");*
* key_file = new KeyFile ();*
* key_file.load_from_file (config_file.to_string(), KeyFileFlags.NONE);*
But I cannot find out how to get the path of the file, since I cannot
convert GLib.File to string.
Any help is highly appreciated.
--
Satyajit Sahoo
Profile - Facebook <http://facebook.com/satya164>,
Google+<http://plus.google.com/u/0/114564489020097923600>
Artwork - DeviantArt <http://satya164.deviantart.com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]