# Load and parse the text file with the folders to exclude from the AppData directory
function parse_appdata_exclude() {
    $exclude_list = Get-Content (Join-Path $PSScriptRoot exclude_from_appdata.list)
    $exclude = @()
    foreach ($line in $exclude_list.Split("`n"))
    {
        $exclude += '-xr"!' + $line.Trim() + '"'
    }
    return $exclude
}

function parse_sync_exclude() {
    $exclude_list = Get-Content (Join-Path $PSScriptRoot exclude_from_sync.list)
    $exclude = @()
    foreach ($line in $exclude_list.Split("`n"))
    {
        $exclude += $line.Trim()
    }
    return ("| " + ($exclude -join ";"))
}