Function

Camelutil_get_directory_variants

since: 3.40

Declaration [src]

GPtrArray*
camel_util_get_directory_variants (
  const gchar* main_path,
  const gchar* replace_prefix,
  gboolean with_modules_dir
)

Description [src]

The main_path is a directory, which will be always used. It should have as its prefix the replace_prefix, otherwise the function returns only the main_path in the paths array.

When there’s exported an environment variable EDS_EXTRA_PREFIXES, it is used as a list of alternative prefixes where to look for the main_path (rest after the replace_prefix).

When the with_modules_dir is TRUE, there’s also added g_get_user_data_dir() + “evolution/modules/”, aka ~/.local/share/evolution/modules/, into the resulting array.

Available since: 3.40

Parameters

main_path

Type: const gchar*

The main path to work with.

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

Type: const gchar*

Path prefix to replace.

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

Type: gboolean

Whether to add also the modules directory.

Return value

Type: An array of utf8

A %GPtrArray with paths to use, including the main_path. Free it with g_ptr_array_unref(), when no longer needed.

The caller of the function takes ownership of the data container, but not the data inside it.
Each element is a NUL terminated UTF-8 string.