expand


Description:

[ Version ( since = "2.4" ) ]
public static string expand (string path, bool recode) throws Error

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 unexpand.

Parameters:

path

a NUL-terminated string in UTF-8 encoding

recode

whether to convert to the filesystem's encoding

Returns:

a newly allocated NUL-terminated string