[change]
If you look at the source of dirset, it looks like it uses java File.list()
, whose, it says that there is no ordering. So you cannot count on it absolutely. However, before returning, it calls Arrays.sort(files);
See line 1572.
According to the preservation order, I could not say that I would jeopardize that there is no guarantee, but usually the order of the file systems is preserved.
As for testing, I assume that you want to do the action if this file exists or something similar using ant contrib,
<for param="directory"> <dirset dir="dirIneedtoexist"> </dirset> <sequential> </sequential> </for>
If there is nothing in the circus, if you do nothing.
source share