Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 85dff41758625c26d7c6097135c8f737 > files > 8

cone-doc-0.78-3.fc12.x86_64.rpm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>

  <title>mail::ACCOUNT::createFolder</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-copymessagesto.html" title="mail::ACCOUNT::copyMessagesTo"/>
  <link rel="next" href="account-deletefolder.html" title="mail::ACCOUNT::deleteFolder"/>
  <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::createFolder</th>
      </tr>

      <tr>
        <td width="20%" align="left" rowspan="1" colspan="1">
        <a accesskey="p" href="account-copymessagesto.html" shape="rect">Prev</a>&#160;</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">
        &#160;<a accesskey="n" href="account-deletefolder.html" shape="rect">Next</a></td>
      </tr>
    </table>
    <hr/>
  </div>

  <div class="refentry" lang="en" xml:lang="en">
    <a id="account-createfolder" shape="rect" name="account-createfolder"> </a>

    <div class="titlepage"/>

    <div class="refnamediv">
      <h2>Name</h2>

      <p>mail::ACCOUNT::createFolder &#8212; Create a new
      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&#160;&lt;libmail/sync.H&gt;<br clear="none"/>
        <br clear="none"/>
        mail::ACCOUNT&#160;*mail;<br clear="none"/>
        mail::folder&#160;*folder;<br clear="none"/></p>
      </div>

      <div class="funcsynopsis">
        <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
          <tr>
            <td rowspan="1" colspan="1"><code class="funcdef">mail::folder *f=mail-&gt;<b class="fsfunc">createFolder</b>(</code></td>

            <td rowspan="1" colspan="1">const mail::folder
            *&#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">parentFolder</var>,</td>
          </tr>

          <tr>
            <td rowspan="1" colspan="1">&#160;</td>

            <td rowspan="1" colspan="1">std::string &#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">name</var>,</td>
          </tr>

          <tr>
            <td rowspan="1" colspan="1">&#160;</td>

            <td rowspan="1" colspan="1">bool &#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">createDirectory</var><code>)</code>;</td>
          </tr>
        </table>

        <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
          <tr>
            <td rowspan="1" colspan="1"><code class="funcdef">bool
            ok=mail-&gt;<b class="fsfunc">createFolder</b>(</code></td>

            <td rowspan="1" colspan="1">const mail::folder
            *&#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">folder</var>,</td>
          </tr>

          <tr>
            <td rowspan="1" colspan="1">&#160;</td>

            <td rowspan="1" colspan="1">bool &#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">createDirectory</var><code>)</code>;</td>
          </tr>
        </table>
      </div>

      <div class="literallayout">
        <p><br clear="none"/>
        std::string&#160;errmsg=mail-&gt;getErrmsg();<br clear="none"/></p>
      </div>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id554876" shape="rect" name="id554876"> </a>

      <h2>USAGE</h2>

      <p>Most mail accounts support the ability to create and
      delete folders, which are arranged in a tree-like hierarchy.
      <code class="function">mail::ACCOUNT::createFolder</code>
      creates a new folder. There are two versions of this
      function.</p>

      <p>The first version creates a subfolder of an existing
      folder, <em class="parameter"><code>parentFolder</code></em>.
      <em class="parameter"><code>name</code></em> is the new
      folder's name, in the application's character set. If the
      folder is succesfully created a <span class="structname">mail::folder</span> object is returned that
      represents the newly-created folder (the application is
      responsible for destroying the new <span class="structname">mail::folder</span> object).</p>

      <p>The second version creates a new folder that's specified
      by an existing <span class="structname">mail::folder</span>
      object (which is usually created by <a class="link" href="account-getfolderfromstring.html" title="mail::ACCOUNT::getFolderFromString" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::getFolderFromString</span>(3x)</span></a>
      or <a class="link" href="account-getfolderfrompath.html" title="mail::ACCOUNT::getFolderFromPath" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::getFolderFromPath</span>(3x)</span></a>).</p>

      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
        <h3 class="title">Note</h3>

        <p><em class="parameter"><code>createDirectory</code></em>
        should be set to <code class="literal">true</code> to
        create a new folder directory, and <code class="literal">false</code> for a regular folder. 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.</p>
      </div>

      <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="id555099" shape="rect" name="id555099"> </a>

      <h2>RETURN CODES AND CALLBACKS</h2>

      <p>This first <code class="function">mail::ACCOUNT::createFolder</code> function
      returns a NULL pointer if it cannot create the new folder,
      for some reason; the second <code class="function">mail::ACCOUNT::createFolder</code> function
      returns <code class="literal">false</code> if it fails.</p>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id555128" shape="rect" name="id555128"> </a>

      <h2>SEE ALSO</h2>

      <p><a class="link" href="account-getfolderfrompath.html" title="mail::ACCOUNT::getFolderFromPath" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::getFolderFromPath</span>(3x)</span></a>,
      <a class="link" href="account-getfolderfromstring.html" title="mail::ACCOUNT::getFolderFromString" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::getFolderFromString</span>(3x)</span></a>,
      <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>,
      <a class="link" href="mail-setappcharset.html" title="mail::setAppCharset" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::setAppCharset</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-copymessagesto.html" shape="rect">Prev</a>&#160;</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">
        &#160;<a accesskey="n" href="account-deletefolder.html" shape="rect">Next</a></td>
      </tr>

      <tr>
        <td width="40%" align="left" valign="top" rowspan="1" colspan="1">mail::ACCOUNT::copyMessagesTo&#160;</td>

        <td width="20%" align="center" rowspan="1" colspan="1">
        <a accesskey="h" href="index.html" shape="rect">Home</a>&#160;|&#160;<a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td>

        <td width="40%" align="right" valign="top" rowspan="1" colspan="1">&#160;mail::ACCOUNT::deleteFolder</td>
      </tr>
    </table>
  </div>
</body>
</html>