Files.newDirectoryStream vs File.listFiles
Paulo Levi
i30817 at gmail.com
Sat May 19 08:09:06 PDT 2012
Ugh, when i wrote "watch service" i meant DirectoryStream
On Sat, May 19, 2012 at 4:05 PM, Paulo Levi <i30817 at gmail.com> wrote:
> The new io api seems a little verbose to me (especially the static methods
> in Files - that i assume are going to be extension methods?)
>
> I was just changing my code to use Paths instead of Files and i came upon
> this case where the the listfiles alternative seems to mandate laziness and
> one-off iteration. I get that it's good policy, however to retrofit code
> that uses eager [] iteration it won't be a smooth transition.
>
> Might you add a method that "drains" a hidden watch service into a list of
> paths?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20120519/514958c0/attachment.html
More information about the nio-discuss
mailing list