KStandardDirs Class Reference

[kdecore Index] [kdecore Hierarchy] [Headers]


Site-independent access to standard KDE directories More...

#include <kstddirs.h>

Public Members


Detailed Description

Site-independent access to standard KDE directories.

The various directory accessors allow you to access the various KDE FSSTND directories in a portable way.

Since the KDE FSSTND is heirarchical, the accessors provide the ability to get the directory in the most to the least specific location (in order, Application/User/System);

Additionally, each accessor has the ability to find the most specific directory that actually exists. The default is no check whether the directory exists. Ordinarily, you will not want to manually instantiate this class. The global KApplication object instantiates and provides const access to a KStandardDirs object via the KApplication::dirs method.


KStandardDirs( const char *appName ) [public]

KStandardDirs Constructor.

Parameters:
appName The name of the application, which will be used for searching the "apps" directory.

~KStandardDirs() [public]

KStandardDirs Destructor.

enum DirScope ( Closest, App, User, SysApp, System ) [public]

The scope of a directory. App is the application-specific directory in the user's local KDE directory, User is the user's local KDE directory, SysApp is the application-specific directory in the system directory and System is the system directory in which KDE is installed.

Closest is used for searching the first directory in the list that exists, in the order App, User, SysApp, System.

const char* app(DirScope s = Closest) const [public]

The full path to the application-specific directory.

const char* bin(DirScope s = Closest) const [public]

The full path to the kde binary directory.

const char* cgi(DirScope s = Closest) const [public]

The full path to the directory in which KDE-specific CGI programs are stored.

const char* config(DirScope s = Closest) const [public]

The full path to the directory in which configuration files are stored.

const char* apps(DirScope s = Closest) const [public]

The full path to the data directory.

const char* html(DirScope s = Closest) const [public]

The full path to the directory in which HTML documentation is saved. This does not take into account the current locale setting.

const char* icon(DirScope s = Closest) const [public]

The full path to the directory in which icon images are stored.

const char* locale(DirScope s = Closest) const [public]

The full path to the directory in which locale information and translation catalogues are stored.

const char* mime(DirScope s = Closest) const [public]

The full path to the directory in which MIME information is stored.

const char* parts(DirScope s = Closest) const [public]

The full path to the directory in which mini icons are stored.

const char* toolbar(DirScope s = Closest) const [public]

The full path to the directory in which toolbar icons are stored.

const char* wallpaper(DirScope s = Closest) const [public]

The full path to the directory in which wallpapers are stored.

const char* sound(DirScope s = Closest) const [public]

The full path to the directory in which sound files are stored.

QString findExe( const char *appname, const char *pathstr=0, bool ignoreExecBit=false ) [public static]

Finds the executable in the system path. A valid executable must be a file and have its executable bit set.

Parameters:
ignoreExecBit If true, an existing file will be returned even if its executable bit is not set.
appname the name of the executable file for which to search.
pathstr The path which will be searched. If this is 0 (default), the $PATH environment variable will be searched.
Returns:
The path of the executable. If it was not found, this string will be null.
See Also:
findAllExe

int findAllExe( QStrList& list, const char *appname, const char *pathstr=0, bool ignoreExecBit=false ) [public static]

Finds all occurences of an executable in the system path.

Parameters:
ignoreExecBit If true, an existing file will be returned even if its executable bit is not set.
appname The name of the executable for which to search.
list will be filled with the pathnames of all the executables found. Will be empty if the executable was not found.
pathstr The path list which will be searched. If this is 0 (default), the $PATH environment variable will be searched.
Returns:
The number of executables found, 0 if none were found.
See Also:
findExe

  • Author: Sirtaj Singh Kang <taj@kde.org>
  • Version: $Id: KStandardDirs.html.in,v 1.1.1.1 2000/02/09 22:25:01 tasin Exp $
  • Documentation generated by tasin@cd1 on Die Nov 30 17:31:35 CET 1999
Kdoc