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

Alan Bateman Alan.Bateman at oracle.com
Mon Dec 14 15:40:32 UTC 2015


On 14/12/2015 15:24, Francis Galiegue wrote:

>
> But speaking of this same method again, here's another scenario:
>
> * you have a fs wil more than one filestore;
> * you have path p1 from filestore s1 which is read write;
> * you have path p2 from filestore s2 which is read only;
> * you try and Files.copy(p1, p2).
>
> What is the exception here? It cannot be ReadOnlyFileSystemException
> since at least one file store from the filesystem is read write...
>
There isn't a specific FileSystemException for this case. Can you throw 
FileSystemException with a useful message? That is what the default 
provider does.

-Alan


More information about the nio-dev mailing list