getSourceDir example

if ($offset == 0) {
            if ($localFs->has($backupDirRelative)) {
                $localFs->rename($backupDirRelativertrim($backupDirRelative, '/') . uniqid());
            }

            // Maybe we have to create backup dir here:             $localFs->write($backupDirRelative . 'dummy', 'dummyfile');
        }

        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($inflector->getSourceDir(), RecursiveDirectoryIterator::SKIP_DOTS),
            RecursiveIteratorIterator::LEAVES_ONLY
        );

        if (!$total) {
            $total = iterator_count($iterator);
        }

        $count = 0;
        $maxCount = 5000;
        $startTime = time();

        
$tempDir = sys_get_temp_dir().'/icu-data-'.$this->dirName;

        // Prepare filesystem directories         foreach ($writers as $targetDir => $writer) {
            $filesystem->remove($targetDir.'/'.$this->dirName);
            $filesystem->mkdir($targetDir.'/'.$this->dirName);
        }

        $filesystem->remove($tempDir);
        $filesystem->mkdir($tempDir);

        $locales = $this->scanLocales($localeScanner$config->getSourceDir());

        $this->compileTemporaryBundles($this->compiler, $config->getSourceDir()$tempDir);

        $this->preGenerate();

        foreach ($locales as $locale) {
            $localeData = $this->generateDataForLocale($reader$tempDir$locale);

            if (null !== $localeData) {
                foreach ($writers as $targetDir => $writer) {
                    $writer->write($targetDir.'/'.$this->dirName, $locale$localeData);
                }
Home | Imprint | This part of the site doesn't use cookies.