libxdg-basedir-1.2.0 1.2.0
|
Functions for using the XDG Base Directory specification. More...
Go to the source code of this file.
Data Structures | |
struct | xdgHandle |
Handle to XDG data cache. More... |
Macros | |
#define | XDG_BASEDIR_SPEC 0.7 |
Version of XDG Base Directory specification implemented in this library. |
Functions | |
XDG data cache management | |
xdgHandle * | xdgInitHandle (xdgHandle *handle) |
Initialize a handle to an XDG data cache and initialize the cache. | |
void | xdgWipeHandle (xdgHandle *handle) |
Wipe handle of XDG data cache. | |
int | xdgUpdateData (xdgHandle *handle) |
Update the data cache. | |
Basic XDG Base Directory Queries | |
const char * | xdgDataHome (xdgHandle *handle) |
Base directory for user specific data files. | |
const char * | xdgConfigHome (xdgHandle *handle) |
Base directory for user specific configuration files. | |
const char *const * | xdgDataDirectories (xdgHandle *handle) |
Preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. | |
const char *const * | xdgSearchableDataDirectories (xdgHandle *handle) |
Preference-ordered set of base directories to search for data files with $XDG_DATA_HOME prepended. | |
const char *const * | xdgConfigDirectories (xdgHandle *handle) |
Preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. | |
const char *const * | xdgSearchableConfigDirectories (xdgHandle *handle) |
Preference-ordered set of base directories to search for configuration files with $XDG_CONFIG_HOME prepended. | |
const char * | xdgCacheHome (xdgHandle *handle) |
Base directory for user specific non-essential data files. | |
const char * | xdgRuntimeDirectory (xdgHandle *handle) |
Base directory for user specific non-essential runtime files such as sockets and named pipes. |
Functions for using the XDG Base Directory specification.
Definition in file basedir.h.
const char * xdgCacheHome | ( | xdgHandle * | handle | ) |
Base directory for user specific non-essential data files.
handle | Handle to data cache, initialized with xdgInitHandle(). |
const char *const * xdgConfigDirectories | ( | xdgHandle * | handle | ) |
Preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory.
handle | Handle to data cache, initialized with xdgInitHandle(). |
const char * xdgConfigHome | ( | xdgHandle * | handle | ) |
Base directory for user specific configuration files.
handle | Handle to data cache, initialized with xdgInitHandle(). |
const char *const * xdgDataDirectories | ( | xdgHandle * | handle | ) |
Preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory.
handle | Handle to data cache, initialized with xdgInitHandle(). |
const char * xdgDataHome | ( | xdgHandle * | handle | ) |
Base directory for user specific data files.
handle | Handle to data cache, initialized with xdgInitHandle(). |
Initialize a handle to an XDG data cache and initialize the cache.
Use xdgWipeHandle() to free the handle.
const char * xdgRuntimeDirectory | ( | xdgHandle * | handle | ) |
Base directory for user specific non-essential runtime files such as sockets and named pipes.
handle | Handle to data cache, initialized with xdgInitHandle(). |
const char *const * xdgSearchableConfigDirectories | ( | xdgHandle * | handle | ) |
Preference-ordered set of base directories to search for configuration files with $XDG_CONFIG_HOME prepended.
The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS.
handle | Handle to data cache, initialized with xdgInitHandle(). |
const char *const * xdgSearchableDataDirectories | ( | xdgHandle * | handle | ) |
Preference-ordered set of base directories to search for data files with $XDG_DATA_HOME prepended.
The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS.
handle | Handle to data cache, initialized with xdgInitHandle(). |
int xdgUpdateData | ( | xdgHandle * | handle | ) |
Update the data cache.
This should not be done frequently as it reallocates the cache. Even if updating the cache fails the handle remains valid and can be used to access XDG data as it was before xdgUpdateData() was called.
void xdgWipeHandle | ( | xdgHandle * | handle | ) |
Wipe handle of XDG data cache.
Wipe handle initialized using xdgInitHandle().