Camel.Store.get_folder_info_sync
Description: Reference for Camel.Store.get_folder_info_sync

### Virtual Method

# Camel Storeget_folder_info_sync

since: 3.0

#### Declaration [src]

    CamelFolderInfo*
    get_folder_info_sync (
      CamelStore* store,
      const gchar* top,
      CamelStoreGetFolderInfoFlags flags,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

This fetches information about the folder structure of `store`, starting with `top`, and returns a tree of `CamelFolderInfo` structures. If `flags` includes `CAMEL_STORE_FOLDER_INFO_SUBSCRIBED`, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If `flags` includes `CAMEL_STORE_FOLDER_INFO_RECURSIVE`, the returned tree will include all levels of hierarchy below `top`. If not, it will only include the immediate subfolders of `top`. If `flags` includes `CAMEL_STORE_FOLDER_INFO_FAST`, the unread_message_count fields of some or all of the structures may be set to -1, if the store cannot determine that information quickly. If `flags` includes `CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL`, don’t include special virtual folders (such as vTrash or vJunk).

The returned `CamelFolderInfo` tree should be freed with camel_folder_info_free().

The CAMEL_STORE_FOLDER_INFO_FAST flag should be considered deprecated; most backends will behave the same whether it is supplied or not. The only guaranteed way to get updated folder counts is to both open the folder and invoke `camel_folder_refresh_info()` it.

Available since: 3.0

#### Parameters

`top`

  Type: `const gchar*`

  The name of the folder to start from.

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

`flags`

  Type: `CamelStoreGetFolderInfoFlags`

  Various CAMEL_STORE_FOLDER_INFO_* flags to control behavior.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`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 virtual function 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: `CamelFolderInfo`

A `CamelFolderInfo` tree, or `NULL` on error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.