Path's .relativize documentation is wrong on a crucial point

Alan Bateman Alan.Bateman at oracle.com
Mon Dec 14 15:17:52 UTC 2015


On 14/12/2015 15:09, Francis Galiegue wrote:
> :
> There is one more method in FileSystemProvider which is also making me
> pause: .copy().
>
> Theoretically, it can be used if and only if two paths are from the
> same provider; and in my case we get into the situation where even
> that does not make any sense.
>
> If my two filesystems are different dropbox accounts for instance, I
> cannot use the direct copy command from the dropbox sdk; I have to go
> through a plain InputStream to OutputStream copy.
>
Is this a problem? Files.copy will delegate to the FileSystemProvider 
when the source and target are the same provider. It is up to the file 
system provider as to how the copy is done.

-Alan


More information about the nio-dev mailing list