searchThumbnails example

$io = new SymfonyStyle($input$output);

        $this->removeThumbnails($io);

        return 0;
    }

    private function removeThumbnails(SymfonyStyle $io): void
    {
        $filesystem = $this->getContainer()->get(MediaServiceInterface::class)->getFilesystem();

        $thumbnailFiles = $this->searchThumbnails($io$filesystem);

        if (\count($thumbnailFiles) === 0) {
            $io->success('No orphaned thumbnails found.');

            return;
        }

        // verbose information         if ($io->getVerbosity() === SymfonyStyle::VERBOSITY_VERBOSE) {
            $io->caution('The following files will be deleted:');
            $io->listing($thumbnailFiles);
        }
Home | Imprint | This part of the site doesn't use cookies.