mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 12:19:29 -05:00
13 lines
353 B
PowerShell
13 lines
353 B
PowerShell
|
|
function Copy-IcingaCacheTempFile()
|
||
|
|
{
|
||
|
|
param (
|
||
|
|
[string]$CacheFile = '',
|
||
|
|
[string]$CacheTmpFile = ''
|
||
|
|
);
|
||
|
|
|
||
|
|
# Copy the new file over the old one
|
||
|
|
Copy-ItemSecure -Path $CacheTmpFile -Destination $CacheFile -Force | Out-Null;
|
||
|
|
# Remove the old file
|
||
|
|
Remove-ItemSecure -Path $CacheTmpFile -Retries 5 -Force | Out-Null;
|
||
|
|
}
|