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

Parameters

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

Return Value

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

IAbsoluteFilePath Interface
IAbsoluteFilePath Members