def collect_output(self, results_collector, output_type, action, name):
        # Not using input path, this is because action knows it path
        # in this context.
        if action.staging_action_local:
            return  # Galaxy (client) will collect output.

        if not name:
            # TODO: Would not work on Windows. Any use in allowing
            # remote_transfer action for Windows?
            name = os.path.basename(action.path)

        pulsar_path = self.job_directory.calculate_path(name, output_type)
        description = "staging out file %s via %s" % (pulsar_path, action)
        self.action_executor.execute(lambda: action.write_from_path(pulsar_path), description)
dataset/ETHPy150Open galaxyproject/pulsar/pulsar/managers/staging/post.py/PulsarServerOutputCollector.collect_output/original