If I have a path /a/b/c/d/e and I want to remove some of the path from the root - for example remove /a/b/c from it to get just /d/e it is very simple in python:
os.path.relpath("/a/b/c/d/e", "/a/b/c")
The question is how to accomplish this in java. The best idea I have come up with so far is to create a Path for each, create an iterator, loop on it and create a Path array. Then check the size of each of the arrays (5 and 3 in the above example) and then rebuild the path from the 4th location ... very cumbersome..