def download(self):
    self._set_permissions()
    for (remote, local) in self.artifacts:
        if remote.endswith('/'):
            for fxml in self.sftpclient.listdir(remote):
                self._do_download(os.path.join(remote, fxml), os.path.join(local, os.path.basename(fxml)))
        else:
            self._do_download(remote, os.path.join(local, os.path.basename(remote)))
def download(self):
    self._set_permissions()
    for (remote, local) in self.artifacts:
        if remote.endswith('/'):
            for fxml in self.sftpclient.listdir(remote):
                self._do_download(os.path.join(remote, fxml), os.path.join(local, os.path.basename(fxml)))
        else:
            self._do_download(remote, os.path.join(local, os.path.basename(remote)))