mail::ACCOUNT::deleteFolder
Prev | mail::ACCOUNT Synchronous API reference | Next

## Name

mail::ACCOUNT::deleteFolder — Delete a folder

## Synopsis

#include <libmail/sync.H>
mail::ACCOUNT *mail;
mail::folder *folder;

`bool ok=mail->deleteFolder(` | const mail::folder * | folder,
| bool | deleteDirectory`)`;

std::string errmsg=mail->getErrmsg();

## USAGE

This function deletes an existing folder. `deleteDirectory` specifies whether the existing folder is regular folder, or a folder directory.

### Note

This function only removes the actual folder in the mail account. The `folder` object is not affected, the application is still responsible for destroying the object, when it is no longer needed.

## RETURN CODES AND CALLBACKS

This method returns `true` if it succeeds, or `false` if it fails. If the method fails, use `mail::ACCOUNT::getErrmsg()` to read a brief description of the error.

## SEE ALSO

mail::ACCOUNT::getFolderFromPath(3x), mail::ACCOUNT::getFolderFromString(3x), mail::folder::createSubFolder(3x).

Prev | Up | Next
mail::ACCOUNT::createFolder | Home | ToC | mail::ACCOUNT::delRights