OS Manuals

econf_writeFile(3)

econf_writeFile - write configuration to file

ECONF_WRITEFILE(3) libeconf Manual ECONF_WRITEFILE(3)

econf_writeFile - write configuration to file

#include <libeconf.h>

econf_err econf_writeFile(econf_file *key_file, const char *save_dir, const char *file_name);

The econf_writeFile() function writes the configuration information stored in the key_file object to the disk.

The file is saved in the directory specified by save_dir with the name specified by file_name. If the directory or file permissions do not allow writing, the function will fail.

Upon successful completion, ECONF_SUCCESS shall be returned.

Otherwise, an error number of type econf_err shall be returned to indicate the error.

ECONF_ARGUMENT_IS_NULL_VALUE


The value specified by key_file is NULL.

ECONF_NOFILE


Configuration file not found.

ECONF_NOMEM


Out of memory.

ECONF_WRITEERROR


Error creating or writing to a file.

libeconf(3), econf_readFile(3), econf_newIniFile(3), econf_free(3), econf_errString(3).

2023-12-14 libeconf

libeconf 0.8.6-r3 · os · ingested 2026-10-31