23 #ifndef SSK_KSTDDIRS_H
24 #define SSK_KSTDDIRS_H
28 #include <tqstringlist.h>
29 #include <tdeglobal.h>
32 class TDEStandardDirsPrivate;
147 void addPrefix(
const TQString& dir );
156 void addXdgConfigPrefix(
const TQString& dir );
165 void addXdgDataPrefix(
const TQString& dir );
186 bool addResourceType(
const char *type,
187 const TQString& relativename );
204 bool addResourceDir(
const char *type,
205 const TQString& absdir);
225 TQString findResource(
const char *type,
226 const TQString& filename )
const;
243 bool isRestrictedResource(
const char *type,
244 const TQString& relPath=TQString::null )
const;
258 TQ_UINT32 calcResourceHash(
const char *type,
259 const TQString& filename,
bool deep)
const;
277 TQStringList findDirs(
const char *type,
278 const TQString& reldir )
const;
300 TQString findResourceDir(
const char *type,
301 const TQString& filename)
const;
323 TQStringList findAllResources(
const char *type,
324 const TQString& filter = TQString::null,
325 bool recursive =
false,
326 bool unique =
false)
const;
350 TQStringList findAllResources(
const char *type,
351 const TQString& filter,
354 TQStringList &relPaths)
const;
365 static TQStringList systemPaths(
const TQString& pstr=TQString::null );
384 static TQString findExe(
const TQString& appname,
385 const TQString& pathstr=TQString::null,
386 bool ignoreExecBit=
false );
406 static int findAllExe( TQStringList& list,
const TQString& appname,
407 const TQString& pathstr=TQString::null,
408 bool ignoreExecBit=
false );
419 void addKDEDefaults();
443 TQStringList resourceDirs(
const char *type)
const;
451 TQStringList allTypes()
const;
470 TQString saveLocation(
const char *type,
471 const TQString& suffix = TQString::null,
472 bool create =
true)
const;
489 TQString relativeLocation(
const char *type,
const TQString &absPath);
501 static bool makeDir(
const TQString& dir,
int mode = 0755);
530 static TQString kde_default(
const char *type);
535 TQString kfsstnd_prefixes();
540 TQString kfsstnd_xdg_conf_prefixes();
545 TQString kfsstnd_xdg_data_prefixes();
553 TQString localtdedir()
const;
559 static TQString kfsstnd_defaultprefix();
565 static TQString kfsstnd_defaultbindir();
571 TQString localxdgdatadir()
const;
577 TQString localxdgconfdir()
const;
586 static bool exists(
const TQString &fullPath);
596 static TQString realPath(
const TQString &dirname);
606 static TQString realFilePath(
const TQString &filename);
610 TQStringList prefixes;
613 TQDict<TQStringList> absolutes;
614 TQDict<TQStringList> relatives;
616 mutable TQDict<TQStringList> dircache;
617 mutable TQDict<TQString> savelocations;
625 class TDEStandardDirsPrivate;
626 TDEStandardDirsPrivate *d;
628 void checkConfig()
const;
629 void applyDataRestrictions(
const TQString &)
const;
630 void createSpecialResource(
const char*);
635 void addPrefix(
const TQString& dir,
bool priority );
636 void addXdgConfigPrefix(
const TQString& dir,
bool priority );
637 void addXdgDataPrefix(
const TQString& dir,
bool priority );
641 bool addResourceType(
const char *type,
642 const TQString& relativename,
bool priority );
643 bool addResourceDir(
const char *type,
644 const TQString& absdir,
bool priority);
Access KDE Configuration entries.
static TDEInstance * instance()
Returns the global instance.
Access to KDE global objects for use in shared libraries.
Site-independent access to standard KDE directories.
TQString locate(const char *type, const TQString &filename, const TDEInstance *instance=TDEGlobal::instance())
TQString locateLocal(const char *type, const TQString &filename, const TDEInstance *instance=TDEGlobal::instance())