NDepend.API Documentation
GetAbsolutePathFrom Method (IRelativePath)
NDepend.Path Namespace > IRelativePath Interface : GetAbsolutePathFrom Method
The pivot directory from which the absolute path is computed.
A new absolute path representing this relative path resolved from pivotDirectory.
Syntax

Parameters

pivotDirectory
The pivot directory from which the absolute path is computed.

Return Value

A new absolute file path representing this relative file resolved from pivotDirectory.
Exceptions
ExceptionDescription
An absolute path cannot be resolved from pivotDirectory. This can happen for example if pivotDirectory is "C:\Dir1" and this relative path is "..\..\Dir2".
Remarks
If this path is "..\Dir2\File.txt" and pivotDirectory is "C:\Dir1\Dir3", the returned relative file is "C:\Dir1\Dir2\File.txt". If this path is "..\Dir2" and pivotDirectory is "C:\Dir1\Dir3", the returned relative file is "C:\Dir1\Dir2". This method is hidden in IAbsoluteFilePath and IAbsoluteDirectoryPath to get a typed result. The returned file or directory path nor pivotDirectory need to exist for this operation to complete properly.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IRelativePath Interface
IRelativePath Members