Computes the relative path from the given base path to this path.
Both paths are normalized before computing the relative path. If the base is null, returns null.
Example:
var path = new Path ("/home/user/docs/file.txt");
var base_path = new Path ("/home/user");
var rel = path.relativeTo (base_path);
assert (rel != null);
assert (rel.toString () == "docs/file.txt");
| base_path |
the base path to compute relative to. |
|
a new relative Path, or null if base is null. |