[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: working directory of application?
From:       Waldo Bastian <bastian () kde ! org>
Date:       2001-04-26 17:45:25
[Download RAW message or body]

On Thursday 26 April 2001 01:50, Anders Lund wrote:
> This may be obvious, but I didn't find any way: how do I retrieve the
> working directory of my application??
>
> It is a KApplication, but kapp dosen't seem to have it.
>
> -anders

With cwd() you can retrieve the working directory of the process. However, if 
you want to do something in relation to command line arguments you are better 
of using:
	KCmdLineArgs::cwd()

Which gives you the directory from which the program was started. You need 
this if your application is a KUniqueApplication since you can then call the 
application multipe times, and each time from a different directory. However, 
all these calls will end up in the same process, so the "working directory of 
the process" has lost its meaning in that case.

Cheers,
Waldo
-- 
bastian@kde.org | SuSE Labs KDE Developer | bastian@suse.com
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic