public function setFlags($id, $flags)
    {
        $info = $this->_getInfoString($flags);
        $filedata = $this->_getFileData($id);

        // NOTE: double dirname to make sure we always move to cur. if recent flag has been set (message is in new) it will be moved to cur.
        $new_filename = dirname(dirname($filedata['filename'])) . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . "$filedata[uniq]$info";

        if (!@rename($filedata['filename'], $new_filename)) {
            /**
             * @see Zend_Mail_Storage_Exception
             */
            // require_once 'Zend/Mail/Storage/Exception.php';
            throw new Zend_Mail_Storage_Exception('cannot rename file');
        }

        $filedata['flags']    = $flags;
        $filedata['filename'] = $new_filename;

        $this->_files[$id - 1] = $filedata;
    }
public function setFlags($id, $flags)
    {
        $info = $this->_getInfoString($flags);
        $filedata = $this->_getFileData($id);

        // NOTE: double dirname to make sure we always move to cur. if recent flag has been set (message is in new) it will be moved to cur.
        $new_filename = dirname(dirname($filedata['filename'])) . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . "$filedata[uniq]$info";

        if (!@rename($filedata['filename'], $new_filename)) {
            /**
             * @see Zend_Mail_Storage_Exception
             */
            // require_once 'Zend/Mail/Storage/Exception.php';
            throw new Zend_Mail_Storage_Exception('cannot rename file');
        }

        $filedata['flags']    = $flags;
        $filedata['filename'] = $new_filename;

        $this->_files[$id - 1] = $filedata;
    }
public function setFlags ( $ id , $ flags ) { $ info = $ this -> _getInfoString ( $ flags ) ; $ filedata = $ this -> _getFileData ( $ id ) ; // NOTE: double dirname to make sure we always move to cur. if recent flag has been set (message is in new) it will be moved to cur. $ new_filename = dirname ( dirname ( $ filedata [ 'filename' ] ) ) . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . "$filedata[uniq]$info" ; if ( ! @ rename ( $ filedata [ 'filename' ] , $ new_filename ) ) { /**
             * @see Zend_Mail_Storage_Exception
             */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_Exception ( 'cannot rename file' ) ; } $ filedata [ 'flags' ] = $ flags ; $ filedata [ 'filename' ] = $ new_filename ; $ this -> _files [ $ id - 1 ] = $ filedata ; }
set flags for message

NOTE: this method can't set the recent flag.

@param   int   $id    number of message
@param   array $flags new flags for message
@throws  Zend_Mail_Storage_Exception
set flags for message