/** * {@inheritdoc} */ public function write(OutputInterface $output) { $outputPath = $this->outputDir . '/' . $output->permalink()->relativeFilePath(); if ($output->hasFileReference()) { $this->filesystem->copy($output->file(), $outputPath, true); } else { $this->filesystem->mkdir(dirname($outputPath)); file_put_contents($outputPath, $output->formattedContent()); } }