econf_getPath - Man Page

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

econf_readFile(3), econf_readConfig(3), libeconf(3)

Info

2024-12-04 libeconf Manual