ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: File modification dates
Date Mon, 25 Sep 2000 16:01:20 GMT
--- Peter Donald <donaldp@mad.scientist.com> wrote:
> At 10:17  25/9/00 +0100, you wrote:
> >I am using the <copydir /> task to copy files from one directory to
> >another.
> >Is there anyway to have it maintain the original modification dates for
> >the copied files?
> 
> Unfortunately it is not possible in java and thus not possible in ant
> :(.
> You can do renames which I think keep original OS specific details but
> no provision is made for copy.

Couldn't you add a "preserve" attribute? Then add:
  if(preserve) destFile.setLastModified(srcFile.lastModified())
(or something close to it, if that's not exactly right) to Copyfile.java?

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Mime
View raw message