How to get homedir ?

F

Florent 'flure' C.

Hello,

I'm writing an app in ruby/glade and I want to save the configuration and
some data in the directory of the user.
There is the function g_get_home_dir() in the GLib, but I can't find the
way to call it from ruby :(
Also I need it to function on GNU/Linux, Windows, and hopefully MacOS X.

So, can anybody help me ?
 
G

gabriele renzi

il Thu, 29 Apr 2004 11:38:55 +0200, "Florent 'flure' C."
Hello,

I'm writing an app in ruby/glade and I want to save the configuration and
some data in the directory of the user.
There is the function g_get_home_dir() in the GLib, but I can't find the
way to call it from ruby :(
Also I need it to function on GNU/Linux, Windows, and hopefully MacOS X.

well, ENV['HOME'] works fine on my windows box and linux one
 
S

Sascha Doerdelmann

gabriele renzi said:
There is the function g_get_home_dir() in the GLib, but I can't find the
way to call it from ruby :(
Also I need it to function on GNU/Linux, Windows, and hopefully MacOS X.

well, ENV['HOME'] works fine on my windows box and linux one

We had similar questions before, e. g. the thread
"Profile-independent directory specification for NT?"
might be interesting in this context.

Cheers
Sascha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top