Method

GLibKeyFileto_data

Declaration

gchar*
g_key_file_to_data (
  GKeyFile* key_file,
  gsize* length,
  GError** error
)

Description

This function outputs key_file as a string.

Note that this function never reports an error, so it is safe to pass NULL as error.

Available since:2.6

Parameters

length gsize*
 

Return location for the length of the returned string, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
 The instance takes ownership of the data, and is responsible for freeing it.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: utf8
 

A newly allocated string holding the contents of the GKeyFile.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.