Method

GLibKeyFileload_from_bytes

Declaration

gboolean
g_key_file_load_from_bytes (
  GKeyFile* key_file,
  GBytes* bytes,
  GKeyFileFlags flags,
  GError** error
)

Description

Loads a key file from the data in bytes into an empty GKeyFile structure. If the object cannot be created then %error is set to a GKeyFileError.

Available since:2.50

Parameters

bytes GBytes
 

A GBytes.

 The data is owned by the caller of the function.
flags GKeyFileFlags
 

Flags from GKeyFileFlags.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if a key file could be loaded, FALSE otherwise.