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 org.apache.tools.ant.util.FileUtils 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?

Thanks.

--Cyril

Reply via email to