NDepend.API Documentation
TryGetRelativePathFrom Method (IAbsoluteDirectoryPath)
NDepend.Path Namespace > IAbsoluteDirectoryPath Interface : TryGetRelativePathFrom Method
The pivot directory from which the relative path is computed.
A new relative directory path representing this directory relative to pivotDirectory.
If this method returns false, contains a plain-english message explaining why it failed.
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.
relativeDirectoryPath
A new relative directory path representing this directory relative to pivotDirectory.
failureReason
If this method returns false, contains a plain-english message explaining why it failed.

Return Value

true if the operation works, else returns false.
Requirements

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

See Also

Reference

IAbsoluteDirectoryPath Interface
IAbsoluteDirectoryPath Members