<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/> <title>mail::ACCOUNT::renameFolder</title> <link rel="stylesheet" href="manpage.css" type="text/css"/> <link rel="start" href="index.html" title="Cone: COnsole Newsreader And Emailer"/> <link rel="up" href="synchronous.html" title="mail::ACCOUNT Synchronous API reference"/> <link rel="prev" href="account-removemessages.html" title="mail::ACCOUNT::removeMessages"/> <link rel="next" href="account-savefolderindexinfo.html" title="mail::ACCOUNT::saveFolderIndexInfo"/> <link xmlns="" rel="icon" href="icon.gif" type="image/gif"/> <meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/> <!-- Copyright 2002 - 2007 Double Precision, Inc. See COPYING for distribution information. --> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center" rowspan="1"> mail::ACCOUNT::renameFolder</th> </tr> <tr> <td width="20%" align="left" rowspan="1" colspan="1"> <a accesskey="p" href="account-removemessages.html" shape="rect">Prev</a> </td> <th width="60%" align="center" rowspan="1" colspan="1"> <span class="structname">mail::ACCOUNT</span> Synchronous API reference</th> <td width="20%" align="right" rowspan="1" colspan="1">  <a accesskey="n" href="account-savefolderindexinfo.html" shape="rect">Next</a></td> </tr> </table> <hr/> </div> <div class="refentry" lang="en" xml:lang="en"> <a id="account-renamefolder" shape="rect" name="account-renamefolder"> </a> <div class="titlepage"/> <div class="refnamediv"> <h2>Name</h2> <p>mail::ACCOUNT::renameFolder — Rename a folder</p> </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <div class="literallayout"> <p><br clear="none"/> <br clear="none"/> <br clear="none"/> <br clear="none"/> #include <libmail/sync.H><br clear="none"/> <br clear="none"/> mail::ACCOUNT *mail;<br clear="none"/></p> </div> <div class="funcsynopsis"> <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" colspan="1"><code class="funcdef">mail::folder *folder=mail-><b class="fsfunc">renameFolder</b>(</code></td> <td rowspan="1" colspan="1">const mail::folder * </td> <td rowspan="1" colspan="1"><var class="pdparam">oldFolder</var>,</td> </tr> <tr> <td rowspan="1" colspan="1"> </td> <td rowspan="1" colspan="1">const mail::folder * </td> <td rowspan="1" colspan="1"><var class="pdparam">newParent</var>,</td> </tr> <tr> <td rowspan="1" colspan="1"> </td> <td rowspan="1" colspan="1">std::string  </td> <td rowspan="1" colspan="1"><var class="pdparam">name</var><code>)</code>;</td> </tr> </table> </div> <div class="literallayout"> <p><br clear="none"/> std::string errmsg=mail->getErrmsg();<br clear="none"/></p> </div> </div> <div class="refsect1" lang="en" xml:lang="en"> <a id="id572156" shape="rect" name="id572156"> </a> <h2>USAGE</h2> <p>This function renames an existing folder. <em class="parameter"><code>oldFolder</code></em> is an existing folder or a folder directory (see <a class="link" href="folder-createsubfolder.html" title="mail::folder::createSubFolder" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::folder::createSubFolder</span>(3x)</span></a> for more information on folders and folder directories). <em class="parameter"><code>newParent</code></em>, if not NULL, specifies the new parent folder directory. A NULL <em class="parameter"><code>newParent</code></em> specifies that the folder should be be moved to the top level of the mail account's folder hierarchy.</p> <p><em class="parameter"><code>name</code></em> specifies the new name of the folder, in the application's character set.</p> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>Some mail servers reserve certain characters which cannot be used in folder names. IMAP mail servers use a special character (usually "<code class="literal">/</code>" or "<code class="literal">.</code>") as a separator between names in a hierarchical folder path. The actual character varies from server to server. An attempt to create/rename a folder whose name includes a reserved character will fail. Different IMAP servers use different hierarchy separator characters. An attempt to create a folder may fail on one IMAP server even if another IMAP server can succesfully create a folder with the same name. This is, unfortunately, a design flaw in the IMAP protocol.</p> </div> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>Maildir folders created by are compatible and can be read by the <a class="ulink" href="http://www.courier-mta.org" target="_top" shape="rect">Courier-IMAP</a> server. Names of maildir folders may contain any character, including the characters "<code class="literal">:</code>", "<code class="literal">/</code>", "<code class="literal">.</code>", "<code class="literal">~</code>", and "<code class="literal">:</code>". However, if the same folders are exported via IMAP, folders whose name includes these characters may not be readable by some IMAP clients. Even a <span class="application">LibMAIL</span> application may not be able to read one of these folders via IMAP.</p> </div> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p>Mbox mail folders created by <span class="application">LibMAIL</span> are mostly compatible and can be exported by IMAP servers that read mbox-formatted mail folders (with some limitations, such as that the same mbox folder cannot be open by <span class="application">LibMAIL</span> and another application at the same time). Names of mbox folders can contain any character, including the characters "<code class="literal">/</code>", and "<code class="literal">~</code>". However if mbox folders are exported via IMAP, folders whose name includes these characters may not be readable by some IMAP clients.</p> </div> </div> <div class="refsect1" lang="en" xml:lang="en"> <a id="id572357" shape="rect" name="id572357"> </a> <h2>RETURN CODES AND CALLBACKS</h2> <p>This function returns a pointer to the renamed <span class="structname">mail::folder</span> object, or a NULL pointer if the folder cannot be renamed for some reason. The application is responsible for destroying the new <span class="structname">mail::folder</span> object, when it is no longer needed.</p> </div> <div class="refsect1" lang="en" xml:lang="en"> <a id="id572376" shape="rect" name="id572376"> </a> <h2>SEE ALSO</h2> <p><a class="link" href="account-createfolder.html" title="mail::ACCOUNT::createFolder" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::createFolder</span>(3x)</span></a>.</p> </div> </div> <div class="navfooter"> <hr/> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left" rowspan="1" colspan="1"> <a accesskey="p" href="account-removemessages.html" shape="rect">Prev</a> </td> <td width="20%" align="center" rowspan="1" colspan="1"> <a accesskey="u" href="synchronous.html" shape="rect">Up</a></td> <td width="40%" align="right" rowspan="1" colspan="1">  <a accesskey="n" href="account-savefolderindexinfo.html" shape="rect">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top" rowspan="1" colspan="1">mail::ACCOUNT::removeMessages </td> <td width="20%" align="center" rowspan="1" colspan="1"> <a accesskey="h" href="index.html" shape="rect">Home</a> | <a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td> <td width="40%" align="right" valign="top" rowspan="1" colspan="1"> mail::ACCOUNT::saveFolderIndexInfo</td> </tr> </table> </div> </body> </html>