ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyril Sagan <>
Subject <copy/> does not "preservelastmodified" on directories.
Date Thu, 13 Oct 2011 20:15:04 GMT
My goal is to copy a directory tree, and preserve the last-modified-time of
all the files and *directories* in the copied tree.

Through my research through the Ant manual, mailing lists, and bug database
I find no mention of this being possible, or reported previously as an
enhancement request.   My workaround is to <exec/> "cp -pR".   This works
fine on our Unix flavors, but does not work on Windows.

I glanced at the code for and
ResourceUtils, from the source it doesn't look like the preservelastmodified
attribute was ever intended to apply to directories.    Can someone from
ant-dev offer an opinion on why directories aren't (shouldn't be?) included
in the semantics for preserving modification times?

Does this seems like a reasonable enhancement request?
Can anyone suggest a Windows workaround?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message