What does Path.iterator() iterate over?
Alan Bateman
Alan.Bateman at Sun.COM
Mon Oct 6 06:10:37 PDT 2008
Alex Miller wrote:
> I notice Path implements Iterable<Path>. What does Path.iterator() iterate over?
>
> The two possibilities I thought of were:
> 1) The hierarchical Paths that make up the Path
> 2) The contents of the Path if Path is a directory
>
> The javadoc is absent for this method so maybe if that was added, it could spell it out.
>
>
It is indeed missing - thanks! It returns an iterator over the name
elements of the Path. I'll make sure this is fixed for the next build.
-Alan.
More information about the nio-discuss
mailing list