def backup(self, handle, source, target): if Disk.isdir(source): target_path = '%s/%s' % (target, os.path.split(source)[1]) self.backup_dir(handle, source, target_path) else: self.backup_file(handle, source, target)