How to .resolve*() and .relativize() Paths which are not issued from the same FileSystem?

Francis Galiegue fgaliegue at
Sun Nov 30 10:27:07 UTC 2014

Hello again,

On Sun, Nov 30, 2014 at 10:06 AM, Alan Bateman <Alan.Bateman at> wrote:
>> Now, I create two FileSystems out of the provider, on two different
>> accounts. If I have a path issued from one provider and another issued
>> from the second, at a first glance it does not make any sense to
>> resolve/relativize one against the other.
> I'm curious as to why you would disallow this? They may be to different
> dropbox accounts but I assume the file path syntax is the same and they have
> the same internal representation (as they are associated with the same file
> system provider). So if someone is moving a file from a folder in one
> dropbox account to another then I would expect it to work and for it not to
> loose the file name representation as part of the move.

Then what filesystem should the resulting path be associated with?
Depending on the arguments, if "other" is returned then we get a path
which is not associated with "us"...

My initial confusion probably comes from the fact that when I tried to
copy a file from a zip filesystem onto the default filesystem, I was
unable to resolve the path issued from the zip against the path on
disk... I had to .toString() the zip path before resolving :/

Francis Galiegue, fgaliegue at,
JSON Schema in Java:
Parsers in pure Java: (redde

More information about the nio-dev mailing list