ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: Copy and attributes
Date Thu, 11 Oct 2001 09:27:57 GMT
Vojta Filip wrote:

> Hi,
> 
> I need to copy some directories and there are some unix executable files.
> But <copy> do not preserve 'x' attribute on files. Is it possible to copy
> and preserve file attributes?
> 
>   Vojta

Vojta,

Since Java's File classes do not provide information about the execute 
bits on files, it is impossible for Ant to support this without 
resorting to native methods or executing a platform specific command. 
What you could do is where you know you are on a Unix platform, use 
<exec> to run cp and drop back to <copy> on other platforms.

Conor



Mime
View raw message