Method

PeasEngineadd_search_path

Declaration [src]

void
peas_engine_add_search_path (
  PeasEngine* engine,
  const char* module_dir,
  const char* data_dir
)

Description [src]

Appends a search path to the list of paths where to look for plugins.

A so-called “search path” actually consists of both a module directory (where the shared libraries or language modules lie) and a data directory (where the plugin data is).

The plugin will be able to use a correct data dir depending on where it is installed, hence allowing to keep the plugin agnostic when it comes to installation location: the same plugin can be installed either in the system path or in the user’s home directory, without taking other special care than using peas_plugin_info_get_data_dir() when looking for its data files.

If data_dir is NULL, then it is set to the same value as module_dir.

Parameters

module_dir

Type: const char*

The plugin module directory.

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

Type: const char*

The plugin data directory.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.