## GimpConfig-path GimpConfig-path — File path utilities for libgimpconfig. |

## Functions

GParamSpec * | gimp_param_spec_config_path ()
GimpConfigPathType | gimp_param_spec_config_path_type ()
gchar * | gimp_config_path_expand ()
gchar * | gimp_config_build_data_path ()
gchar * | gimp_config_build_writable_path ()
gchar * | gimp_config_build_plug_in_path ()
#define | GIMP_VALUE_HOLDS_CONFIG_PATH()

## Types and Values

typedef | GimpConfigPath
enum | GimpConfigPathType

## Description

File path utilities for libgimpconfig.

## Functions

### gimp_param_spec_config_path ()

    GParamSpec *
    gimp_param_spec_config_path (const gchar *name,
                                 const gchar *nick,
                                 const gchar *blurb,
                                 GimpConfigPathType type,
                                 const gchar *default_value,
                                 GParamFlags flags);

Creates a param spec to hold a filename, dir name, or list of file or dir names. See `g_param_spec_internal()` for more information.

#### Parameters

name | Canonical name of the param |
nick | Nickname of the param |
blurb | Brief desciption of param. |
type | a GimpConfigPathType value. |
default_value | Value to use if none is assigned. |
flags | a combination of GParamFlags |

#### Returns

a newly allocated GParamSpec instance

Since GIMP 2.4

### gimp_param_spec_config_path_type ()

    GimpConfigPathType
    gimp_param_spec_config_path_type (GParamSpec *pspec);

Tells whether the path param encodes a filename, dir name, or list of file or dir names.

#### Parameters

pspec | A GParamSpec for a path param |

#### Returns

a GimpConfigPathType value

Since GIMP 2.4

### gimp_config_path_expand ()

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

Paths as stored in the gimprc 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.

#### Parameters

path | a NUL-terminated string in UTF-8 encoding |
recode | whether to convert to the filesystem's encoding |
error | return location for errors |

#### Returns

a newly allocated NUL-terminated string

Since GIMP 2.4

### gimp_config_build_data_path ()

    gchar *
    gimp_config_build_data_path (const gchar *name);

Creates a search path as it is used in the gimprc file. The path returned by `gimp_config_build_data_path()` includes a directory below the user's gimp directory and one in the system-wide data directory.

Note that you cannot use this path directly with `gimp_path_parse()`. As it is in the gimprc notation, you first need to expand and recode it using `gimp_config_path_expand()`.

#### Parameters

name | directory name (in UTF-8 encoding) |

#### Returns

a newly allocated string

Since GIMP 2.4

### gimp_config_build_writable_path ()

    gchar *
    gimp_config_build_writable_path (const gchar *name);

Creates a search path as it is used in the gimprc file. The path returned by `gimp_config_build_writable_path()` is just the writable parts of the search path constructed by `gimp_config_build_data_path()`.

Note that you cannot use this path directly with `gimp_path_parse()`. As it is in the gimprc notation, you first need to expand and recode it using `gimp_config_path_expand()`.

#### Parameters

name | directory name (in UTF-8 encoding) |

#### Returns

a newly allocated string

Since GIMP 2.4

### gimp_config_build_plug_in_path ()

    gchar *
    gimp_config_build_plug_in_path (const gchar *name);

Creates a search path as it is used in the gimprc file. The path returned by `gimp_config_build_plug_in_path()` includes a directory below the user's gimp directory and one in the system-wide plug-in directory.

Note that you cannot use this path directly with `gimp_path_parse()`. As it is in the gimprc notation, you first need to expand and recode it using `gimp_config_path_expand()`.

#### Parameters

name | directory name (in UTF-8 encoding) |

#### Returns

a newly allocated string

Since GIMP 2.4

### GIMP_VALUE_HOLDS_CONFIG_PATH()

    #define GIMP_VALUE_HOLDS_CONFIG_PATH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_CONFIG_PATH))

## Types and Values

### GimpConfigPath

    typedef gchar *                   GimpConfigPath; /* to satisfy docs */

### enum GimpConfigPathType

#### Members

GIMP_CONFIG_PATH_FILE |  |
GIMP_CONFIG_PATH_FILE_LIST |  |
GIMP_CONFIG_PATH_DIR |  |
GIMP_CONFIG_PATH_DIR_LIST |  |