roundcubemail/program/lib/Roundcube/rcube_imap.php
public function create_folder($folder, $subscribe = false, $type = null)
    {
        if (!$this->check_connection()) {
            return false;
        }

        $result = $this->conn->createFolder($folder, $type ? array("\\" . ucfirst($type)) : null);

        // try to subscribe it
        if ($result) {
            // clear cache
            $this->clear_cache('mailboxes', true);

            if ($subscribe) {
                $this->subscribe($folder);
            }
        }

        return $result;
    }
public function create_folder($folder, $subscribe = false, $type = null)
    {
        if (!$this->check_connection()) {
            return false;
        }

        $result = $this->conn->createFolder($folder, $type ? array("\\" . ucfirst($type)) : null);

        // try to subscribe it
        if ($result) {
            // clear cache
            $this->clear_cache('mailboxes', true);

            if ($subscribe) {
                $this->subscribe($folder);
            }
        }

        return $result;
    }
public function create_folder ( $ folder , $ subscribe = false , $ type = null ) { if ( ! $ this -> check_connection ( ) ) { return false ; } $ result = $ this -> conn -> createFolder ( $ folder , $ type ? array ( "\\" . ucfirst ( $ type ) ) : null ) ; // try to subscribe it if ( $ result ) { // clear cache $ this -> clear_cache ( 'mailboxes' , true ) ; if ( $ subscribe ) { $ this -> subscribe ( $ folder ) ; } } return $ result ; }
Create a new folder on the server and register it in local cache

@param string  $folder    New folder name
@param boolean $subscribe True if the new folder should be subscribed
@param string  $type      Optional folder type (junk, trash, drafts, sent, archive)

@return boolean True on success
Create a new folder on the server and register it in local cache