Task/File/FileFetchTask.php
public function execute(ProcessState $state)
    {
        $this->findMatchingFiles($state);

        $file = current($this->matchingFiles);
        if (!$file) {
            $state->setSkipped(true);

            return;
        }

        $this->doFileCopy($state, $file, $this->getOption($state, 'remove_source'));
        $state->setOutput($file);
    }
public function execute(ProcessState $state)
    {
        $this->findMatchingFiles($state);

        $file = current($this->matchingFiles);
        if (!$file) {
            $state->setSkipped(true);

            return;
        }

        $this->doFileCopy($state, $file, $this->getOption($state, 'remove_source'));
        $state->setOutput($file);
    }
@param ProcessState $state

@throws \InvalidArgumentException
@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface
@throws \UnexpectedValueException
@throws \League\Flysystem\FilesystemNotFoundException
@throws \League\Flysystem\FileNotFoundException