16 May
2014
16 May
'14
3:51 p.m.
Yakov Galka wrote:
Basically higher rank elements erase the lower rank ones, highest rank is absolute. So here, rank(drive) > rank(root) > rank(regular), rank(x) = max rank of elements of x. You add the requirement that relative() returns a minimal-rank path, and I think you are ok with uniquiness on Windows and Unix.
It's a bit more complicated than that on Windows, because these two: z1 = "/a" z2 = "c:a" have the same rank (or, to be precise, their ranks can't be ordered) - both are between relative and absolute. One is drive-relative, directory-absolute, other is drive-absolute, directory-relative. I think that the definition still holds, though.