What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from 2012-09-18 07:03:41 PDT ---
I originally identified the bug. First I'd like to comment more on the
terminology, and give my proposed fix.

The description in the documentation matches the implementation, and reflects
what a user would find most useful. There is no implementation bug that I'm
aware of (see below for more discussion of this).

The only issue is naming. The SpanMode enum constants 'depth' and 'breadth'
actually describe 'postorder depth-first' and 'preorder depth-first'
respectively. That means the word 'depth' carries insufficient information to
identify it, and 'breadth' is just wrong. If you're unfamiliar with tree
traversal algorithms and can't immediately see this, then please review the
examples and terminology on .
(Pretty much everyone missed the point on the newsgroup - please do this if
you're at all uncertain!)

So here's my proposed fix:

enum SpanMode {

  @deprecated alias preorder breadth;
  @deprecated alias postorder depth;

As for the behaviour on Linux - I don't think this is actually violating the
spec. Probably what you're complaining about is that the directories 'c' and
'b' are coming before the files '2.txt' and '1.txt' which are siblings.
However, the spec doesn't say anything about a directory's position relative to
its siblings. It only talks about a directory's position relative to its
children. See the difference:

For preorder depth-first:
must come before

has no ordering constraint with

If 'directories first' or 'directories last' is required, then that would be
more of a feature request than a bug :) It could probably be generalised to
child sorting - the user could supply a comparator which (if present) is used
to sort the children in each directory.

Hope that helps :)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to