private/Core/Initialize-OSDeployCoreWinPEDrivers.ps1

function Initialize-OSDeployCoreWinPEDrivers {
    <#
    .SYNOPSIS
        Creates the directory structure for OSDeployCore paths.
 
    .DESCRIPTION
        Ensures all required OSDeployCore directories exist under $env:ProgramData\OSDeployCore.
        Creates the following structure:
        - cache
        - cache/downloads
        - winpe-drivers/amd64
        - winpe-drivers/arm64
 
    .NOTES
        Author: David Segura
        Company: Recast Software
        Change Summary:
    #>

    [CmdletBinding()]
    param ()

    $paths = @(
        (Join-Path $Script:OSDeployCorePath 'cache'),
        (Join-Path $Script:OSDeployCorePath 'cache' 'downloads'),
        (Join-Path $script:OSDeployCoreRepositoryPath 'winpe-drivers' 'amd64'),
        (Join-Path $script:OSDeployCoreRepositoryPath 'winpe-drivers' 'arm64')
    )

    foreach ($path in $paths) {
        if (-not (Test-Path -Path $path)) {
            New-Item -ItemType Directory -Path $path -Force | Out-Null
            Write-Verbose "Created directory: $path"
        }
    }
}