ECONF\_GETPATH(3) libeconf Manual ECONF\_GETPATH(3)

# [NAME](#NAME)

econf\_getPath - evaluate path name of the configuration file

# [SYNOPSIS](#SYNOPSIS)

```
#include <libeconf.h>
```

**char \*econf\_getPath(econf\_file \*kf);**

# [DESCRIPTION](#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](#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](#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](#SEE_ALSO)

[**econf\_readFile**(3)](/man/os/libeconf/econf_readFile.3), [**econf\_readConfig**(3)](/man/os/libeconf/econf_readConfig.3), [**libeconf**(3)](/man/os/libeconf/libeconf.3)

2024-12-04 libeconf

---

Document: econf_getPath(3) from libeconf 0.8.6-r1 (Chainguard OS)
Source: https://github.com/openSUSE/libeconf
