commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Herscu <bmf1...@fastmail.fm>
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...

Adrian.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message