| ECONF_GETPATH(3) | libeconf Manual | ECONF_GETPATH(3) |
NAME
econf_getPath - evaluate path name of the configuration file
SYNOPSIS
#include <libeconf.h>
char *econf_getPath(econf_file *kf);
DESCRIPTION
The econf_getPath() function returns the absolute path name of the configuration file associated with the kf object.
This is useful when the kf object was created via functions that read from disk, such as econf_readFile(), to identify the origin of the configuration data.
RETURN VALUE
Upon successful completion, econf_getPath() returns a pointer to a null-terminated string containing the absolute path of the file.
If kf is NULL, or if the kf object represents already merged data (for example, result of econf_readConfig() or econf_mergeFiles()), the function returns an empty string,
ERRORS
As this function returns a string pointer, it does not return econf_err codes. However, it may return an empty string if the input is invalid or no path is associated.
SEE ALSO
| 2024-12-04 | libeconf |