protected function getFiles($specified)
    {
        $specified = (array) $specified;

        if (php_sapi_name() === 'cli') {
            return [];
        }

        if ($this->extension === null) {
            return [];
        }

        $path = $this->extensionsManager->getExtensionPathByName($this->extension);

        if (!$path) {
            return [];
        }

        $public     = $path . DIRECTORY_SEPARATOR . 'public';
        $filesystem = app(Filesystem::class);
        if (empty($specified)) {
            return $filesystem->allFiles($public);
        }

        $return = [];

        foreach ($specified as $file) {
            $target = $public . DIRECTORY_SEPARATOR . $file;

            if (!file_exists($target) && file_exists(public_path($file))) {
                $target = public_path($file);
            }

            array_push($return, new SplFileInfo($public . DIRECTORY_SEPARATOR . $file, current(explode('/', $file)), $file));
        }

        return $return;
    }