Converts a relative path to an absolute path.
Resolve-FullPath [-Path] <String> [<CommonParameters>]
Unlike Resolve-Path
, this function does not check whether the path exists. It just converts relative paths to absolute paths.
Unrooted paths (e.g. ..\..\See\I\Do\Not\Have\A\Root
) are first joined with the current directory (as returned by Get-Location
).
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Path | String | The path to resolve. Must be rooted, i.e. have a drive at the beginning. |
true | false |
Resolve-FullPath -Path 'C:\Projects\Carbon\Test\..\Carbon\FileSystem.ps1'
Returns C:\Projects\Carbon\Carbon\FileSystem.ps1
.
Resolve-FullPath -Path 'C:\Projects\Carbon\..\I\Do\Not\Exist'
Returns C:\Projects\I\Do\Not\Exist
.
Resolve-FullPath -Path ..\..\Foo\..\Bar
Because the Path
isn't rooted, joins Path
with the current directory (as returned by Get-Location
), and returns the full path. If the current directory is C:\Projects\Carbon
, returns C:\Bar
.