Function

GimpConfigPathexpand

Declaration [src]

gchar*
gimp_config_path_expand (
  const gchar* path,
  gboolean recode,
  GError** error
)

Description [src]

Paths as stored in gimprc and other config files have to be treated special. The string may contain special identifiers such as for example ${gimp_dir} that have to be substituted before use. Also the user’s filesystem may be in a different encoding than UTF-8 (which is what is used for the gimprc). This function does the variable substitution for you and can also attempt to convert to the filesystem encoding.

To reverse the expansion, use gimp_config_path_unexpand().

Available since:2.4

Parameters

path const gchar*
 

A NUL-terminated string in UTF-8 encoding.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
recode gboolean
 

Whether to convert to the filesystem’s encoding.

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

Return value

Returns: gchar*
 

A newly allocated NUL-terminated string.

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