src/Private/Assessment/Remove-MCSFiles.ps1

function Remove-MCSFiles {
    Param($WorkingDirectory,$Debug)

    if ($Debug.IsPresent) {
        $DebugPreference = "Continue"
    } else {
        $DebugPreference = "SilentlyContinue"
    }

    Write-Debug ((get-date -Format 'yyyy-MM-dd HH:mm:ss') + ' - Starting Cleanup Module')

    # CleanUp
    <#
    Write-Host "Cleaning up WARA and ARI generated files..."
    if (Test-Path -PathType Leaf -Path $WARAFile) {
        Remove-Item $WARAFile -Force
    }
    #>

    if (Test-Path -PathType Container -Path "$workingDirectory\DiagramCache") {
        Remove-Item "$workingDirectory\DiagramCache" -Force -Recurse
    }
    if (Test-Path -PathType Container -Path "$workingDirectory\ReportCache") {
        Remove-Item "$workingDirectory\ReportCache" -Force -Recurse
    }
    if (Test-Path -PathType Leaf -Path "$workingDirectory\DiagramLogFile.log") {
        Remove-Item "$workingDirectory\DiagramLogFile.log" -Force
    }
}