FileVisitor extension method

Alan Bateman Alan.Bateman at oracle.com
Sun Jun 10 01:15:12 PDT 2012


On 09/06/2012 22:03, Paulo Levi wrote:
> As extension methods are in imminent danger of being added, would it 
> be likely to have a
>
> void accept(Path p) default {
>  accept(p.toFile());
> }
>
> or would that be too dangerous (are there providers that have toFile() 
> as a stub?)
This wouldn't make sense for FileVisitor, perhaps you are proposing you 
mean java.io.FileFilter?

The toFile() method returns a java.io.File then so can only be 
implemented by the default provider or providers that delegate or layer 
over the default provider.

-Alan


More information about the nio-discuss mailing list