KeyFile.loadFromFile

bool loadFromFile(string file, glib.types.KeyFileFlags flags)

Loads a key file into an empty #GKeyFile 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.

Parameters

filethe path of a filename to load, in the GLib filename encoding
flagsflags from #GKeyFileFlags

Returns

true if a key file could be loaded, false otherwise

Throws

[KeyFileException]