ECONF_WRITEFILE(3)

NAME
econf_writeFile - write configuration to file

SYNOPSIS

#include <libeconf.h>

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

DESCRIPTION

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.

RETURN VALUE

Upon successful completion, ECONF_SUCCESS shall be returned.

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

ERRORS

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.

SEE ALSO

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