GLib.KeyFile.prototype.load_from_data

function load_from_data(data: String, length: Number(gsize), flags: GLib.KeyFileFlags): Boolean {
    // Gjs wrapper for g_key_file_load_from_data()
}
  

Loads a key file from memory into an empty GLib.KeyFile structure. If the object cannot be created then %error is set to a GLib.KeyFileError.

Since 2.6

data

key file loaded in memory

length

the length of data in bytes (or (gsize)-1 if data is nul-terminated)

flags

flags from GLib.KeyFileFlags

Returns

true if a key file could be loaded, false otherwise