ECONF\_GETKEYS(3) libeconf Manual ECONF\_GETKEYS(3)

# [NAME](#NAME)

econf\_getKeys - evaluate all keys of a specific group

# [SYNOPSIS](#SYNOPSIS)

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

**econf\_err econf\_getKeys(econf\_file \*kf, const char \*group, size\_t \*length, char \*\*\*keys);**

# [DESCRIPTION](#DESCRIPTION)

The **econf\_getKeys**() function retrieves all keys belonging to a specific *group* from the configuration file object pointed to by *kf*.

The *group* parameter specifies the name of the section (group) to be evaluated. If *group* is **NULL**, the function retrieves keys that do not belong to any specific group (entries defined at the beginning of the file).

The total number of keys found is stored in the integer pointed to by *length*.

The names of the keys are stored in a dynamically allocated array of strings, which is returned via the *keys* pointer. The memory for this array is allocated by the library and should be freed by the caller using **econf\_freeArray**() or an equivalent method when it is no longer needed.

# [RETURN VALUE](#RETURN_VALUE)

Upon successful completion, the function returns **ECONF\_SUCCESS**.

Otherwise, an error value is returned to indicate the error condition.

# [ERRORS](#ERRORS)

**ECONF\_ARGUMENT\_IS\_NULL\_VALUE**

The value specified by *kf* or *keys* is **NULL**.

**ECONF\_NOKEY**

Keys not found.

**ECONF\_NOMEM**

Insufficient memory could be allocated for the return array.

# [SEE ALSO](#SEE_ALSO)

[**libeconf**(3)](/man/os/libeconf/libeconf.3), [**econf\_getGroups**(3)](/man/os/libeconf/econf_getGroups.3), [**econf\_freeArray**(3)](/man/os/libeconf/econf_freeArray.3), [**econf\_readFile**(3)](/man/os/libeconf/econf_readFile.3), [**econf\_errString**(3)](/man/os/libeconf/econf_errString.3).

2023-12-15 libeconf

---

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