NDepend.API Documentation
GetRelativePathFrom Method (IAbsoluteDirectoryPath)
NDepend.Path Namespace > IAbsoluteDirectoryPath Interface : GetRelativePathFrom Method
The pivot directory from which the relative path is computed.
Compute this directory as relative from pivotDirectory. If this directory is "C:\Dir1\Dir2" and pivotDirectory is "C:\Dir1\Dir3", the returned relative directory is "..\Dir2".
Syntax

Parameters

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

Return Value

A new relative directory path representing this directory relative to pivotDirectory.
Exceptions
ExceptionDescription
pivotDirectory is not on the same drive as this directory's drive.
Remarks
This directory 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

IAbsoluteDirectoryPath Interface
IAbsoluteDirectoryPath Members