public function getWorkspacesBasePath($path = null)
    {
        $workspacesBasePath = getenv('SURF_WORKSPACE');
        if (! $workspacesBasePath) {
            $path = $path ?: $this->getHomeDir();
            if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
                if ($workspacesBasePath = getenv('LOCALAPPDATA')) {
                    $workspacesBasePath = Files::concatenatePaths([$workspacesBasePath, 'Surf']);
                } else {
                    $workspacesBasePath = Files::concatenatePaths([$path, 'workspace']);
                }
            } else {
                $workspacesBasePath = Files::concatenatePaths([$path, 'workspace']);
            }
        }
        $this->ensureDirectoryExists($workspacesBasePath);

        return $workspacesBasePath;
    }
public function getWorkspacesBasePath($path = null)
    {
        $workspacesBasePath = getenv('SURF_WORKSPACE');
        if (! $workspacesBasePath) {
            $path = $path ?: $this->getHomeDir();
            if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
                if ($workspacesBasePath = getenv('LOCALAPPDATA')) {
                    $workspacesBasePath = Files::concatenatePaths([$workspacesBasePath, 'Surf']);
                } else {
                    $workspacesBasePath = Files::concatenatePaths([$path, 'workspace']);
                }
            } else {
                $workspacesBasePath = Files::concatenatePaths([$path, 'workspace']);
            }
        }
        $this->ensureDirectoryExists($workspacesBasePath);

        return $workspacesBasePath;
    }
public function getWorkspacesBasePath ( $ path = null ) { $ workspacesBasePath = getenv ( 'SURF_WORKSPACE' ) ; if ( ! $ workspacesBasePath ) { $ path = $ path ? : $ this -> getHomeDir ( ) ; if ( defined ( 'PHP_WINDOWS_VERSION_MAJOR' ) ) { if ( $ workspacesBasePath = getenv ( 'LOCALAPPDATA' ) ) { $ workspacesBasePath = Files :: concatenatePaths ( [ $ workspacesBasePath , 'Surf' ] ) ; } else { $ workspacesBasePath = Files :: concatenatePaths ( [ $ path , 'workspace' ] ) ; } } else { $ workspacesBasePath = Files :: concatenatePaths ( [ $ path , 'workspace' ] ) ; } } $ this -> ensureDirectoryExists ( $ workspacesBasePath ) ; return $ workspacesBasePath ; }
Get the base path to local workspaces

@param string $path An absolute path (optional)

@return string The workspaces base path without a trailing slash.
@throws \RuntimeException
@throws InvalidConfigurationException
Get the base path to local workspaces