'Migrates the torrent collecting directory.'

def _migrate_torrent_collecting_dir(self):

    if os.path.exists(self.tmp_migration_tcd_file):
        return
    if (not os.path.exists(self.tmp_migration_dir)):
        try:
            os.mkdir(self.tmp_migration_dir)
        except OSError as e:
            msg = (u'Failed    to    create    temporary    torrent    collecting    migration    directory    %s:    %s' % (self.tmp_migration_dir, e))
            raise OSError(msg)
    elif (not os.path.isdir(self.tmp_migration_dir)):
        msg = (u'The    temporary    torrent    collecting    migration    path    is    not    a    directory:    %s' % self.tmp_migration_dir)
        raise RuntimeError(msg)
    if (not os.path.isdir(self.torrent_collecting_dir)):
        raise RuntimeError(u"The    torrent    collecting    directory    doesn't    exist:    %s", self.torrent_collecting_dir)
    self._delete_swift_reseeds()
    self._get_total_file_count()
    self._delete_swift_files()
    self._rename_torrent_files()
    self._delete_all_directories()
    rmtree(self.torrent_collecting_dir)
    move(self.tmp_migration_dir, self.torrent_collecting_dir)
    open(self.tmp_migration_tcd_file, 'wb').close()
