Legacy java.io.File and new FileSystems
Alan Bateman
Alan.Bateman at oracle.com
Sun Aug 15 03:09:37 PDT 2010
Michael Hall wrote:
> However, this still seems to have limitations with regard to legacy code.
> If as indicated in the javadoc I start with
> - -Djava.nio.file.spi.DefaultFileSystemProvider=<a custom file system
> provider>
> and run a simple program that does
>
> new java.io.File("TestFSP.java").exists();
>
> with verbose classloading it shows no nio is involved.
>
Your observation is correct. As I'm mentioned in other posts here, the
java.io classes in jdk7 don't yet redirect when an alternative default
provider is used. I should have been clearer about that during this
discussion. Once that it is over the finish line then you should see the
above invoking your provider.
-Alan.
More information about the nio-discuss
mailing list