Path of "." and ""
Alan Bateman
Alan.Bateman at oracle.com
Mon Dec 8 21:42:33 UTC 2014
On 08/12/2014 10:37, Wang Weijun wrote:
>> :
>>
>> I also noticed that even if the startsWith method returns false, the p1.relativize(p2) returns a simple "s".
>>
For this example then p1 is the empty path and p2 is "s". Accessing a
file using the empty path is equivalent to accessing the default
directory. The relative path to get from the default directory to "s" is
"s", so I think what you have is correct.
-Alan.
More information about the nio-dev
mailing list