Resolve-FullPath

Converts a relative path to an absolute path.

Syntax

Resolve-FullPath [-Path] <String> [<CommonParameters>]

Description

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).

Parameters

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

EXAMPLE 1

Resolve-FullPath -Path 'C:\Projects\Carbon\Test\..\Carbon\FileSystem.ps1'

Returns C:\Projects\Carbon\Carbon\FileSystem.ps1.

EXAMPLE 2

Resolve-FullPath -Path 'C:\Projects\Carbon\..\I\Do\Not\Exist'

Returns C:\Projects\I\Do\Not\Exist.

EXAMPLE 3

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.