Re: [gnome-love] getting the user's home directory

On Fri, 2004-06-25 at 18:51 +0200, wrote:


    I'm developing a library, and I need to store some files in the user's home
directory.  Idealy, I'd like to make a .hml directory, and just throw the files
under it like


obviously, this is pretty standard stuff, but I was wondering if there was any
accepted wisdom for getting at the current user's home directory.  I'd like to
only depend on glib.  so i guess, g_get_home_dir is the way to go, right? 
Again, this is a library, not an application.

Using g_get_home_dir is probably a good idea. It does work really hard
to get things right (look at the g_get_any_init function in
and be thankful for our base libraries!), and does so too in windows,
which might be useful if your library has uses there.

-- m

Mariano Suárez-Alvarez <msuarezalvarez arnet com ar>

Attachment: signature.asc
Description: This is a digitally signed message part

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