You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Vojta Filip <vo...@idoox.com> on 2001/10/11 09:00:36 UTC
Copy and attributes
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
Re: Copy and attributes
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
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
Re: Copy and attributes
Posted by Vojta Filip <vo...@idoox.com>.
OK, thank you for all your helps - I will use <chmod> and for distribution
creation <tar> with mode.
Vojta
On Thu, 11 Oct 2001, Diane Holt wrote:
> --- Vojta Filip <vo...@idoox.com> wrote:
> > 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?
>
> If you're doing the copies on Unix, and you know which are executable, you
> can use the <chmod> task on the copied files.
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
Re: Copy and attributes
Posted by Diane Holt <ho...@yahoo.com>.
--- Vojta Filip <vo...@idoox.com> wrote:
> 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?
If you're doing the copies on Unix, and you know which are executable, you
can use the <chmod> task on the copied files.
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com