public function generate($path, $themeName, $force = false, array $options = [])
    {
        $options = $this->createOptionsResolver()->resolve($options);
        $this->checkThemeName($themeName);
        $this->processPath($path, $force);

        try {
            $this->createSite(
                $path,
                $themeName,
                $options['prefer-lock'],
                $options['prefer-source'],
                $options['no-scripts']
            );
        } catch (\Exception $e) {
            $this->fs->remove($path);

            throw $e;
        }
    }
public function generate($path, $themeName, $force = false, array $options = [])
    {
        $options = $this->createOptionsResolver()->resolve($options);
        $this->checkThemeName($themeName);
        $this->processPath($path, $force);

        try {
            $this->createSite(
                $path,
                $themeName,
                $options['prefer-lock'],
                $options['prefer-source'],
                $options['no-scripts']
            );
        } catch (\Exception $e) {
            $this->fs->remove($path);

            throw $e;
        }
    }
public function generate ( $ path , $ themeName , $ force = false , array $ options = [ ] ) { $ options = $ this -> createOptionsResolver ( ) -> resolve ( $ options ) ; $ this -> checkThemeName ( $ themeName ) ; $ this -> processPath ( $ path , $ force ) ; try { $ this -> createSite ( $ path , $ themeName , $ options [ 'prefer-lock' ] , $ options [ 'prefer-source' ] , $ options [ 'no-scripts' ] ) ; } catch ( \ Exception $ e ) { $ this -> fs -> remove ( $ path ) ; throw $ e ; } }
Scaffold a new site. In case of exception, the new-site directory
will be removed.

@param string $path      Destination path
@param string $themeName Theme name. Pattern <theme_name>:<theme_version> can be used. "blank" is a special theme
@param bool   $force     Force to clear destination if exists and it's not empty'
@param array  $options

@throws LogicException If there is an attemp of create a non-blank template without the PackageManager
Scaffold a new site . In case of exception the new - site directory will be removed .