compareTo
Compares this path with another path.
The paths are compared based on order when walking a filesystem:
The paths are compared by their length, with shorter paths being considered "less than" longer paths.
If the paths have the same length, they are compared by their segments, in order. The comparison is done by comparing the segment types first, and then the segment values (in alphanumérical order).
Therefore, this is a possible order:
a
a.b
a.foo
a.foo.bar
a.foo.baz
d
d.1
d.2Content copied to clipboard