public/Get-ProcessedFootballFixtureFolderPath.ps1

function Get-ProcessedFootballFixtureFolderPath {
    <#
        .EXAMPLE
            Get-ProcessedFootballFixtureFolderPath -Competition esp-laliga -DateYear 2025 -DateMonth 2 -Type results -Path C:\sportsmonk
         
    #>

    [CmdletBinding()]
    param(

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]$Competition,

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [int]$DateMonth,

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [int]$DateYear,

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]$Path,

        [Parameter(Mandatory=$true)]
        [ValidateSet('predictions','results')]
        [string]$Type
        
    )
    process{

        $ErrorActionPreference = 'Stop'

        try {

            if ($DateMonth -lt 10) {

                $DateMonthToUse = "0$DateMonth"
    
            }
            else {
    
                $DateMonthToUse = $DateMonth
    
            } # if

            $PathToUse = "$Path\fixture-artifact\processed-fixtures\$DateYear\$DateMonthToUse\$Type\$Competition"
            
            return $PathToUse

        }
        catch {

            "$($MyInvocation.MyCommand.Name): $_.Exception.Message"

        } # trycatch

    } # process

} # function