private/New-InternalPathInfo.ps1
#requires -Version 3 Set-StrictMode -Version Latest function New-InternalPathInfo($Path){ $new = [PSCustomObject]@{ PSTypeName = "PwshEnvironment.PathInfo" Path = $Path } $new | Add-Member -MemberType ScriptProperty -Name "Exists" -Value { (Test-Path -LiteralPath $this.Path) } $new } |