Path.isRelativeTo

bool isRelativeTo(Path other) const @safe

Return whether this path is relative to other (pathlib-like).

Semantics:

  • Returns true when this lies on or under other (prefix by path

components), considering platform case-sensitivity.

  • Absolute/relative mismatches return false.
  • On Windows, drive letters and UNC anchors must match (comparison is

case-insensitive).

bool isRelativeTo(string other) const @safe

Overload taking a string