### Constructor

# Camel FolderThread new

since: 3.58

#### Declaration [src]

    CamelFolderThread*
    camel_folder_thread_new (
      CamelFolder* folder,
      GPtrArray* uids,
      CamelFolderThreadFlags flags
    )

#### Description [src]

Thread a (subset) of the messages in a folder.

If `flags` contain `CAMEL_FOLDER_THREAD_FLAG_SUBJECT`, messages with related subjects will also be threaded. The default behaviour is to only thread based on message-id.

Available since: 3.58

#### Parameters

`folder`

  Type: `CamelFolder`

  A `CamelFolder`.

  The data is owned by the caller of the function.

`uids`

  Type: An array of `utf8`

  The subset of uid’s to thread. If `NULL`, then thread all UID-s in the `folder`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  Each element is a NUL terminated UTF-8 string.

`flags`

  Type: `CamelFolderThreadFlags`

  Bit-or of `CamelFolderThreadFlags`.

#### Return value

Type: `CamelFolderThread`

A new `CamelFolderThread` containing a tree of `CamelFolderThreadNode`-s which represent the threaded structure of the messages.

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