# dklibs 1.23.1

- Overview
- Download
- Installation
- Installation from source on Windows systems
- Usage
- FAQ
- Change log
- Other projects
- Tutorial
- Developer docu
- stc
- tracecc and trana
- tracecc GUI
- tracecc PDF man.
- API: sort and search
- API: Generic I/O
- Preferences
- File search
- Font configuration
- LaTeX encodings
- Security

## File search

- Overview
- Placeholders
- Search order for dkapp_find_file()
- Search order for dkapp_find_cfg()

### Overview

The dkapp module provides the functions dkapp_find_file() to search for data or resource files and dkapp_find_cfg() to search for configuration files.
Both functions search for a file in a number of directories to allow user-specific, language-specific and/or compressed versions.

### Placeholders

The following placeholders are used in the directory lists below:

- cwd: current working directory
- home: the users home directory
- prefix: installation prefix (``/usr/local'')
- appname: application name
- groupname: application group name
- appdir: application directory
- shareddir: directory shared between applications
- windir: the Windows directory (on Windows systems only)
- sysconfdir: system configuration directory (/etc or the Windows directory)
- language: the users preferred language
- region: the users preferred region
- encoding: the users preferred encoding

### Search order for dkapp_find_file()

The dkapp_find_file() functions searches for

- filename,
- filename.gz (when compiled with gzip support) and
- filename.bz2 (when compiled with bzip2 support)

in the following directories:

- cwd
- home
- home/.defaults
- appdir/language/region/encoding
- appdir/language/region
- appdir/language/encoding
- appdir/language
- appdir/region/encoding
- appdir/region
- appdir/encoding
- appdir
- shareddir/groupname/language/region/encoding
- shareddir/groupname/language/region
- shareddir/groupname/language/encoding
- shareddir/groupname/language
- shareddir/groupname/region/encoding
- shareddir/groupname/region
- shareddir/groupname/encoding
- shareddir/groupname
- shareddir/language/region/encoding
- shareddir/language/region
- shareddir/language/encoding
- shareddir/language
- shareddir/region/encoding
- shareddir/region
- shareddir/encoding
- shareddir
- windir/appname/language/region/encoding
- windir/appname/language/region
- windir/appname/language/encoding
- windir/appname/language
- windir/appname/region/encoding
- windir/appname/region
- windir/appname/encoding
- windir/appname
- windir/groupname/language/region/encoding
- windir/groupname/language/region
- windir/groupname/language/encoding
- windir/groupname/language
- windir/groupname/region/encoding
- windir/groupname/region
- windir/groupname/encoding
- windir/groupname
- windir/language/region/encoding
- windir/language/region
- windir/language/encoding
- windir/language
- windir/region/encoding
- windir/region
- windir/encoding
- windir
- sysconfdir/appname/language/region/encoding
- sysconfdir/appname/language/region
- sysconfdir/appname/language/encoding
- sysconfdir/appname/language
- sysconfdir/appname/region/encoding
- sysconfdir/appname/region
- sysconfdir/appname/encoding
- sysconfdir/appname
- sysconfdir/groupname/language/region/encoding
- sysconfdir/groupname/language/region
- sysconfdir/groupname/language/encoding
- sysconfdir/groupname/language
- sysconfdir/groupname/region/encoding
- sysconfdir/groupname/region
- sysconfdir/groupname/encoding
- sysconfdir/groupname
- sysconfdir/language/region/encoding
- sysconfdir/language/region
- sysconfdir/language/encoding
- sysconfdir/language
- sysconfdir/region/encoding
- sysconfdir/region
- sysconfdir/encoding
- sysconfdir

### Search order for dkapp_find_cfg()

The dkapp_find_cfg() function searches for the file (probably compressed) in the following directories:

- windir/appname/language/region/encoding
- windir/appname/language/region
- windir/appname/language/encoding
- windir/appname/language
- windir/appname/region/encoding
- windir/appname/region
- windir/appname/encoding
- windir/appname
- windir/groupname/language/region/encoding
- windir/groupname/language/region
- windir/groupname/language/encoding
- windir/groupname/language
- windir/groupname/region/encoding
- windir/groupname/region
- windir/groupname/encoding
- windir/groupname
- windir/language/region/encoding
- windir/language/region
- windir/language/encoding
- windir/language
- windir/region/encoding
- windir/region
- windir/encoding
- windir
- sysconfdir/appname/language/region/encoding
- sysconfdir/appname/language/region
- sysconfdir/appname/language/encoding
- sysconfdir/appname/language
- sysconfdir/appname/region/encoding
- sysconfdir/appname/region
- sysconfdir/appname/encoding
- sysconfdir/appname
- sysconfdir/groupname/language/region/encoding
- sysconfdir/groupname/language/region
- sysconfdir/groupname/language/encoding
- sysconfdir/groupname/language
- sysconfdir/groupname/region/encoding
- sysconfdir/groupname/region
- sysconfdir/groupname/encoding
- sysconfdir/groupname
- sysconfdir/language/region/encoding
- sysconfdir/language/region
- sysconfdir/language/encoding
- sysconfdir/language
- sysconfdir/region/encoding
- sysconfdir/region
- sysconfdir/encoding
- sysconfdir