How about something simple:
PS> gci . -r foo.txt
-filter ( ), foo.txt . *.txt foo?.txt. StartsWith , , /\ PowerShell.
, , $file $ , "PowerShell":
(Split-Path $file -Parent) -replace '/','\' -eq (Get-Item $directory).FullName
, /- > \, , , PowerShell . - IO.Path , :
[io.path]::GetDirectoryName($file) -eq [io.path]::GetFullPath($directory)
, GetFullPath , dir , , , dir PowerShell. , $ , "$ pwd\$directory".