protected function destination(string $name, bool $recursively = false): Fluent
    {
        $filesystem = $this->getContainer()['files'];

        $publicPath = $this->basePath($this->getContainer()['path.public']);

        // Start chmod from public/packages directory, if the extension folder
        // is yet to be created, it would be created and own by the web server
        // (Apache or Nginx). If otherwise, we would then emulate chmod -Rf
        $publicPath = \rtrim($publicPath, '/').'/';
        $workingPath = $basePath = "{$publicPath}packages/";

        // If the extension directory exist, we should start chmod from the
        // folder instead.
        if ($filesystem->isDirectory($folder = "{$basePath}{$name}/")) {
            $recursively = true;
            $workingPath = $folder;
        }

        // Alternatively if vendor has been created before, we need to
        // change the permission on the vendor folder instead of
        // public/packages.
        if (! $recursively && Str::contains($name, '/')) {
            [$vendor, ] = \explode('/', $name);

            if ($filesystem->isDirectory($folder = "{$basePath}{$vendor}/")) {
                $workingPath = $folder;
            }
        }

        return new Fluent([
            'workingPath' => $workingPath,
            'basePath' => $basePath,
            'resursively' => $recursively,
        ]);
    }