def upload(self):
        """
        Uploads an edited world to the current FTP server connection
        """
        for root, directory, files in os.walk(os.path.join('ftp', self._worldname)):
            for folder in directory:
                target = self._host.path.join(root, folder).replace("ftp"+os.path.sep+self._worldname+"/", "").replace("\\", "", 1).replace("\\", "/")
                target = target.replace("ftp"+self._worldname, "")
                if not "##MCEDIT.TEMP##" in target:
                    if not self._host.path.exists(target):
                        self._host.makedirs(target)
        for root, directory, files in os.walk(os.path.join('ftp', self._worldname)):
            for f in files:
                if self._host.path.join(root, f).replace("ftp"+os.path.sep+self._worldname, "").startswith("\\"):
                    target = self._host.path.join(root, f).replace("ftp"+os.path.sep+self._worldname, "").replace("\\", "", 1)
                else :
                    target = self._host.path.join(root, f).replace("ftp"+os.path.sep+self._worldname, "")
                    
                if "\\" in target:
                    target = target.replace("\\", "/")
                try:
                    self._host.upload(os.path.join(root, f), target)
                except Exception as e:
                    if "226" in e.message:
                        pass

        Uploads an edited world to the current FTP server connection
        
ftp_client.py