-
Notifications
You must be signed in to change notification settings - Fork 43
Get SamplerAbsolutePath
Gets the absolute value of a path, that can be relative to another folder
or the current Working Directory $PWD
or Drive.
Get-SamplerAbsolutePath [[-Path] <String>] [[-RelativeTo] <String>]
[<CommonParameters>]
This function will resolve the Absolute value of a path, whether it's potentially relative to another path, relative to the current working directory, or it's provided with an absolute Path.
The Path does not need to exist, but the command will use the right
[System.Io.Path]::DirectorySeparatorChar for the OS, and adjust the
..
and .
of a path by removing parts of a path when needed.
Get-SamplerAbsolutePath -Path '/src' -RelativeTo 'C:\Windows'
# C:\src
Get-SamplerAbsolutePath -Path 'MySubFolder' -RelativeTo '/src'
# C:\src\MySubFolder
Relative or Absolute Path to resolve, can also be $null/Empty and will
return the RelativeTo absolute path.
It can be Absolute but relative to the current drive: i.e.
/Windows
would resolve to C:\Windows
on most Windows systems.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Path to prepend to $Path if $Path is not Absolute. If $RelativeTo is not absolute either, it will first be resolved using [System.Io.Path]::GetFullPath($RelativeTo) before being pre-pended to $Path.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
When the root drive is omitted on Windows, the path is not considered absolute.
Split-Path -IsAbsolute -Path '/src/
- Add-Sample
- Convert-SamplerHashtableToString
- Get-BuildVersion
- Get-BuiltModuleVersion
- Get-ClassBasedResourceName
- Get-CodeCoverageThreshold
- Get-MofSchemaName
- Get-OperatingSystemShortName
- Get-PesterOutputFileFileName
- Get-Psm1SchemaName
- Get-SamplerAbsolutePath
- Get-SamplerBuiltModuleBase
- Get-SamplerBuiltModuleManifest
- Get-SamplerCodeCoverageOutputFile
- Get-SamplerCodeCoverageOutputFileEncoding
- Get-SamplerModuleInfo
- Get-SamplerModuleRootPath
- Get-SamplerProjectName
- Get-SamplerSourcePath
- Invoke-SamplerGit
- Merge-JaCoCoReport
- New-SampleModule
- New-SamplerJaCoCoDocument
- New-SamplerPipeline
- Out-SamplerXml
- Set-SamplerPSModulePath
- Split-ModuleVersion
- Update-JaCoCoStatistic