Constructor

GgitConfignew_from_file

Declaration [src]

GgitConfig*
ggit_config_new_from_file (
  GFile* file,
  GError** error
)

Description [src]

Create a new config from a single on disk file. This is a convenience API and is exactly the same as creating an empty GgitConfig using

ggit_config_new and adding the file with #ggit_config_add_file. The

level will be set to #GGIT_CONFIG_LEVEL_LOCAL. If the config could not be loaded this function returns NULL and error will be set accordingly.

Parameters

file

Type: GFile

The file to load.

The data is owned by the caller of the function.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the constructor if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: GgitConfig

A GgitConfig.

The caller of the function takes ownership of the data, and is responsible for freeing it.