Private/Get-SnapshotPath.ps1

function Get-SnapshotPath {
    [CmdletBinding()]
    param(
        [string]$Path
    )

    if ([string]::IsNullOrWhiteSpace($Path)) {
        $Path = Join-Path $HOME '.PSGalleryTracker'
    }

    if (-not (Test-Path -LiteralPath $Path)) {
        $null = New-Item -Path $Path -ItemType Directory -Force
    }

    return $Path
}