def copy(self, messages, mailbox, uid):
        """Copy the specified messages to the specified mailbox.

        This command is allowed in the Selected state.

        @type messages: C{str}
        @param messages: A message sequence set

        @type mailbox: C{str}
        @param mailbox: The mailbox to which to copy the messages

        @type uid: C{bool}
        @param uid: If true, the C{messages} refers to message UIDs, rather
        than message sequence numbers.

        @rtype: C{Deferred}
        @return: A deferred whose callback is invoked with a true value
        when the copy is successful, or whose errback is invoked if there
        is an error.
        """
        if uid:
            cmd = 'UID COPY'
        else:
            cmd = 'COPY'
        args = '%s %s' % (messages, _prepareMailboxName(mailbox))
        return self.sendCommand(Command(cmd, args))

    #
    # IMailboxListener methods
    #
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/mail/imap4.py/IMAP4Client.copy/original