[CmdletBinding()] param( [switch] $Apply ) Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' $taskWorkspaceRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..')) $nativeProjectRoot = Join-Path $taskWorkspaceRoot 'src\Nitload.Native' $textRoots = @( $nativeProjectRoot (Join-Path $taskWorkspaceRoot 'src\Nitload.Common') (Join-Path $taskWorkspaceRoot 'src\Nitload.Mathematics') (Join-Path $taskWorkspaceRoot 'src\Nitload.Graphics') ) $textExtensions = [Collections.Generic.HashSet[string]]::new( [StringComparer]::OrdinalIgnoreCase ) @( '.c', '.h', '.inl', '.inc', '.ipp', '.cs', '.cmake', '.txt', '.md', '.csproj', '.vcxproj', '.filters', '.json', '.props', '.targets' ) | ForEach-Object { [void] $textExtensions.Add($_) } $replacementRules = @( @{ Pattern = '\bSTGSHARP_'; Replacement = 'NIF_' } @{ Pattern = '\bSN_'; Replacement = 'NIF_' } @{ Pattern = '(? $target" } if (-not $Apply) { 'Dry run only. Re-run with -Apply to perform the migration.' exit 0 } foreach ($pathMove in $pathMoves) { Move-Item -LiteralPath $pathMove.Source -Destination $pathMove.Target } 'NIF prefix migration completed.'