commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Herscu <>
Subject [io] DirectoryWalker scan order
Date Fri, 19 Oct 2007 18:31:49 GMT
Hi all,

I have a test that depends on the scanning order of the 
DirectoryWalker#walk method. The (or, my) problem with this method is 
that it depends on the order of the file array returned by the 
File#listFiles method which by definition does not guarantee any 
particular order...

My specific problem is that tests which pass on a Win32 OS fail on a 
*nix OS because of different scanning order :-(

I cannot see any way to make it scan directories in a specific order... 
Both walk methods cannot be overridden (one is private and the other is 
protected and final).

Any reason for this design?

Perhaps in the next release someone will add an additional walk version 
that accepts a sorter...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message