mail::folder::clone
Prev | mail::folder Native API reference | Next

## 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::folders, and wish to preserve them for the main application (mail::folders received by callback methods are usually destroyed as soon as the callback method terminates).

## RETURN CODES AND CALLBACKS

### Note

mail::folders are linked to their corresponding mail::accounts. A mail::folder created by one mail::account may not be used with a different mail::folder. All mail::folders 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::folders, after their a mail::account is destroyed.

## SEE ALSO

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

Prev | Up | Next
mail::folder::addMessage | Home | ToC | mail::folder::create