### Function

# Camel FolderInfo build

#### Declaration [src]

    CamelFolderInfo*
    camel_folder_info_build (
      GPtrArray* folders,
      const gchar* namespace_,
      gchar separator,
      gboolean short_names
    )

#### Description [src]

This takes an array of folders and attaches them together according to the hierarchy described by their full_names and `separator`. If `namespace_` is non-`NULL`, then it will be ignored as a full_name prefix, for purposes of comparison. If necessary, `camel_folder_info_build()` will create additional `CamelFolderInfo` with `NULL` urls to fill in gaps in the tree. The value of `short_names` is used in constructing the names of these intermediate folders.

#### Parameters

`folders`

  Type: An array of `CamelFolderInfo*`

  An array of `CamelFolderInfo`.

  The data is owned by the caller of the function.

`namespace_`

  Type: `const gchar*`

  An ignorable prefix on the folder names.

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

`separator`

  Type: `gchar`

  The hieararchy separator character.

`short_names`

  Type: `gboolean`

  `TRUE` if the (short) name of a folder is the part after the last `separator` in the full name. `FALSE` if it is the full name.

#### Return value

Type: `CamelFolderInfo`

The top level of the tree of linked folder info.

The caller of the function takes ownership of the data, and is responsible for freeing it.