Public/DistHelpers/Dist.Files.Functions.psm1
Set-StrictMode -Version Latest $ErrorActionPreference = "Stop"; #Requires -Version 5.0 function CleanDir( [Parameter(Position=0,mandatory=$true)] [string] $pathToDirToClean, [Parameter(Position=1,mandatory=$true)] [bool] $shouldClean ) { if ( ((Test-Path -Path $pathToDirToClean) -eq $true) -and ($shouldClean -eq $true) ) { Get-ChildItem $pathToDirToClean | ForEach-Object { Remove-Item -Recurse $_.FullName -Force -Verbose } } } function CopyDirToIntoOtherDir( [Parameter(Position=0,mandatory=$true)] [string] $sourceDir, [Parameter(Position=1,mandatory=$true)] [string] $destinationDir ) { if ((Test-Path -Path $destinationDir) -eq $false) { New-Item -Path $destinationDir -ItemType Directory -Verbose } Copy-Item -Path $sourceDir -Destination $destinationDir -Recurse -Force -Verbose } Export-ModuleMember -Function "*" |