EBackend.SourceRegistryServer.load_directory

### Method

# EBackend SourceRegistryServerload_directory

since: 3.6

#### Declaration [src]

    gboolean
    e_source_registry_server_load_directory (
      ESourceRegistryServer* server,
      const gchar* path,
      ESourcePermissionFlags flags,
      GError** error
    )

#### Description [src]

Loads data source key files in `path`. Because multiple errors can occur when loading multiple files, `error` is only set if `path` can not be opened. If a key file fails to load, the error is broadcast through the `ESourceRegistryServer::load-error` signal.

If the #E_SOURCE_PERMISSION_REMOVABLE flag is given, then the `server` will emit signals on the D-Bus interface when key files are created or deleted in `path`.

Available since: 3.6

#### Parameters

`path`

  Type: `const gchar*`

  The path to the directory to load.

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

`flags`

  Type: `ESourcePermissionFlags`

  Permission flags for files loaded from `path`.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if `path` was successfully opened, but this does not imply the key files were successfully loaded.