ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaco de Groot <>
Subject Re: [PATCH] Change last modified of a copied file.
Date Tue, 07 Nov 2000 15:38:45 GMT wrote:
> Where exactly do you need this functionality? 

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.

> In just the <copy> and
> <move> tasks, or is this a general feature?  Would
> <copy keepdate="yes" ... />
> satsify your needs?

Yes, it would. But maybe it is more aproppiate to do it default. What do the
most OS's do when copying a file? Hmmm, Midnight Commander preserves the last
modified, but the cp command doesn't (I'm using Linux). Maybe this
keepdate="yes" attribute is a better idea. Before hacking this in the code I
would like to hear from other's what thay think is aproppriate.


View raw message