<commit_before><?php
namespace CodeDocs\Processor;

use CodeDocs\Helper\Filesystem;
use CodeDocs\Logger;
use CodeDocs\ProcessorInterface;
use CodeDocs\State;
use CodeDocs\Tag;

/**
 * Copies all docs to a temporary directory
 *
 * @Tag("defaultProcessor")
 */
class MirrorDocs implements ProcessorInterface
{
    /**
     * @param State  $state
     * @param Logger $logger
     *
     * @throws \RuntimeException
     */
    public function run(State $state, Logger $logger)
    {
        $filesystem = new Filesystem();

        $docsDir = $state->config->getDocsDir();

        if ($docsDir === null) {
            $logger->log(0, 'skip copying docs to export dir (no docs dir configured)');

            return;
        }

        $docsDir = realpath($docsDir);
        if ($docsDir === false) {
            $logger->log(0, 'skip copying docs to export dir (docs dir docs dir does not exist)');

            return;
        }

        $exportDir = realpath($state->config->getExportDir());

        $logger->log(0, sprintf('copy docs to export dir (%s -> %s)', $docsDir, $exportDir));
        $filesystem->mirror($docsDir, $exportDir);
    }
}<commit_msg>fixed creating export dir<commit_after><?php
namespace CodeDocs\Processor;

use CodeDocs\Helper\Filesystem;
use CodeDocs\Logger;
use CodeDocs\ProcessorInterface;
use CodeDocs\State;
use CodeDocs\Tag;

/**
 * Copies all docs to a temporary directory
 *
 * @Tag("defaultProcessor")
 */
class MirrorDocs implements ProcessorInterface
{
    /**
     * @param State  $state
     * @param Logger $logger
     *
     * @throws \RuntimeException
     */
    public function run(State $state, Logger $logger)
    {
        $filesystem = new Filesystem();

        $docsDir = $state->config->getDocsDir();

        if ($docsDir === null) {
            $logger->log(0, 'skip copying docs to export dir (no docs dir configured)');

            return;
        }

        $docsDir = realpath($docsDir);
        if ($docsDir === false) {
            $logger->log(0, 'skip copying docs to export dir (docs dir docs dir does not exist)');

            return;
        }

        $exportDir = $state->config->getExportDir();

        $logger->log(0, sprintf('copy docs to export dir (%s -> %s)', $docsDir, $exportDir));
        $filesystem->mirror($docsDir, $exportDir);
    }
}
{'fraction_non_alphanumeric': 0.1353448275862069, 'fraction_numerical': 0.002586206896551724, 'mean_word_length': 2.58179012345679, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2734416', 'n_tokens_mistral': 710, 'n_tokens_neox': 680, 'n_words': 189}