optimizeFiles example

$numberOfFiles = 0;
        if (!$input->getOption('skip-scan')) {
            // Do not count directories, the many sub-dirs would otherwise throw off the progressbar             $numberOfFiles = \count(array_filter($mediaService->getFilesystem()->listContents($path, true)function Darray $element) {
                return $element['type'] === 'file';
            }));
        }

        $progress = new ProgressBar($output$numberOfFiles);

        $this->optimizeFiles($path$input$mediaService$optimizerService$progress$output);

        $progress->finish();

        return 0;
    }

    /** * @throws Exception */
    private function optimizeFiles(
        string $directory,
        
Home | Imprint | This part of the site doesn't use cookies.