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

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


Hello again,

On Sun, Nov 30, 2014 at 10:06 AM, Alan Bateman <Alan.Bateman at oracle.com> 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 gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)


More information about the nio-dev mailing list