src/Viserio/Component/Filesystem/Filesystem.php
public function allFiles(string $directory, bool $showHiddenFiles = false): array
    {
        $files  = [];
        $finder = Finder::create()->files()->ignoreDotFiles(! $showHiddenFiles)->in($directory);

        /** @var \SplFileObject $dir */
        foreach ($finder as $dir) {
            $files[] = $dir->getPathname();
        }

        return $files;
    }
public function allFiles(string $directory, bool $showHiddenFiles = false): array
    {
        $files  = [];
        $finder = Finder::create()->files()->ignoreDotFiles(! $showHiddenFiles)->in($directory);

        /** @var \SplFileObject $dir */
        foreach ($finder as $dir) {
            $files[] = $dir->getPathname();
        }

        return $files;
    }
{@inheritdoc}