ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaco de Groot <>
Subject Last modified of copied files
Date Mon, 09 Oct 2000 10:07:05 GMT

I'm using ant to merge two directory's. I have two source directory's and one
destination directory. If two the same files are found in the two source
directory's I want to have the newest of the two in de destination directory. I

<copydir src="source1" dest="destination" />
<copydir src="source2" dest="destination" />

The problem with this is that the copied files last modified time is the time of
copying. So the files in source2 will never be copied to the destination because
the time of the files in the destination are allways newer.

I solved this by adding the following code to on line 656:


I'm affraid this isn't Java 1.1 compatible, is this a problem?

If the code is changed to make the last modified time the same as the file wich
is copied, this should also be done for directory's I think.


View raw message