<<< Previous |  | Next >>>

# mail::folder::clone

## Name

mail::folder::clone -- Clone a `mail::folder` object

## Synopsis

mail::folder *folder;
mail::folder *folderCopy;

``folderCopy=folder->`clone``(void);`

## USAGE

This function creates a new `mail::folder` object that refers to the same mail folder, in every possible way. This is usually used by some callback methods that receive pointers to `mail::folder`s, and wish to preserve them for the main application (`mail::folder`s received by callback methods are usually destroyed as soon as the callback method terminates).

## RETURN CODES AND CALLBACKS

NOTE:

`mail::folder`s are linked to their corresponding `mail::account`s. A `mail::folder` created by one `mail::account` may not be used with a different `mail::folder`. All `mail::folder`s created by a `mail::account` are invalidated when this `mail::account` object is destroyed. Note that the `mail::folder` objects are not automatically destroyed; the application is still responsible for destroying any remaining `mail::folder`s, after their a `mail::account` is destroyed.

## SEE ALSO

mail::folder::createSubFolder(3x), mail::folder::readSubFolders(3x).

<<< Previous | Home | Next >>>
mail::folder::addMessage | Up | mail::folder::create