KeyFile.loadFromFile

Loads a key file into an empty glib.KeyFile structure.

If the OS returns an error when opening or reading the file, a G_FILE_ERROR is returned. If there is a problem parsing the file, a G_KEY_FILE_ERROR is returned.

This function will never return a G_KEY_FILE_ERROR_NOT_FOUND error. If the file is not found, G_FILE_ERROR_NOENT is returned.

class KeyFile
bool
loadFromFile

Parameters

file string

the path of a filename to load, in the GLib filename encoding

flags GKeyFileFlags

flags from GKeyFileFlags

Return Value

Type: bool

TRUE if a key file could be loaded, FALSE otherwise

Throws

GException on failure.

Meta