I am new to ant and i want to know how the ant copy decides the copying order. Problem is, I have a folder structure like this releases/v1,v2,v3
. folders will be created for each new release. and names of the files will be similar in these folders. and it is required to copy the latest release in to a folder called 'latest' in this scenario it will be required to copy v3 into 'latest'. so my logic is to copy one by one into 'latest' folder and override the files and the latest file will be remained at the end. my code is like this.
<copy todir="${srcdist.layout.dir}/etc/wsdl/latest" flatten="true" overwrite="true">
<fileset dir="../../releases">
<include name="**/*.wsdl"/>
</fileset>
</copy>
This code works fine for me (in centOS). it starts copying from v1 and ends in v3. but i feel doubt on this copying order whether this will work every time or not. is copy todir sorting the folder names before copying ? please help me.