From: Niklas Baumstark Date: 2008-08-01T02:29:19+09:00 Subject: Re: How to get special directories? Gordon Thiesfeld wrote: > On Thu, Jul 31, 2008 at 12:13 PM, Niklas Baumstark > wrote: >> Eric Hodel wrote: >>> On Jul 31, 2008, at 07:57 AM, Niklas Baumstark wrote: >>>> how can i get ruby to get me some special directories, such as the >>>> home-folder on linux or "documents and settings" on windows? is there >>>> already some functionality available to do this or will i have to use >>>> platform-native functions (for example COM on windows)? >>> >>> To get folders like 'documents and settings' on windows you need to >>> use win32api. Depending on language, these may have different names. > > You can also use the win32-dir gem > > C:\>gem in win32-dir > Successfully installed win32-dir-0.3.2 > 1 gem installed > C:\>irb >>> require 'win32/dir' > => true >>> Dir::PROFILE > => "C:\\Documents and Settings\\gthiesfeld" Thanks that'll help alot! Is something similiar available on linux as well? Greetings, Niklas -- Posted via http://www.ruby-forum.com/.