[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: finding the "global" data directory (ex: /opt/kde2/share/apps/)
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2001-12-03 15:48:33
[Download RAW message or body]
That might work if the file already exists. But what can I do to create a
file in that directory?
On Monday 03 December 2001 15:23, Stephan Kulow wrote:
> On Monday, 3. December 2001 13:25, Sebastian Trueg wrote:
> > Hy,
> >
> > i need to find the global kde data directory to write a global
> > configuration file for my application. I use KStandardDirs::locate(
> > "data", "myapp/"). When staring the setup via kdesu the directory seems
> > tobe ok: /opt/kde2/share/apps/ on SuSE. But when I run my setup program
> > as root through a shell I get the local appdata dir: ~/.kde2/share/apps/.
> > Is there a way to ensure that I always get the "global" one?
>
> Yes, pick a file.
> KGlobal::dirs()->findResourceDir("data", "myapp/specificfile") + "myapp/"
>
> Greetings, Stephan
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
>> Visit http://mail.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