EulandaXtools — Funktionsreferenz
Verbindet eine Basis-URI und einen relativen Pfad.
Join-PathUri [[-Base] <string>] [[-Path] <string>] [<CommonParameters>]Entfernt automatisch überflüssige Slashes und verbindet beide Pfade sauber. Unterstützt explizit leere Basis-Pfade (Home-Verzeichnis) und Root-Pfad '/'.
-Base
Type: string
Default: ''Basis-URI (z.B. "/api" oder "").
-Path
Type: string
Default: ''Angehängter Pfad (z.B. "/inbox").
stringKombinierte URI.
# Ausgabe: "test.txt"
Join-PathUri -Base "" -Path "test.txt"# Ausgabe: "test.txt"
Join-PathUri -Base '' -Path '/test.txt'# Ausgabe: "/test.txt"
Join-PathUri -Base '/' -Path 'test.txt'# Ausgabe: "/test.txt"
Join-PathUri -Base '/' -Path '/test.txt'# Ausgabe: "test/test.txt"
Join-PathUri -Base 'test' -Path 'test.txt'# Ausgabe: "test/test.txt"
Join-PathUri -Base 'test' -Path '/test.txt'# Ausgabe: "/test/test.txt"
Join-PathUri -Base '/test' -Path '/test.txt'# Ausgabe: "/test/test.txt"
Join-PathUri -Base '/test' -Path 'test.txt'