ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Les Hughes <leslie.hug...@rubus.com>
Subject RE: file properites in copy task
Date Tue, 26 Feb 2002 09:47:25 GMT
 
What about an Ant equiv of a tar pipe as in tar cf - . |( cd /foo; tar xf -
)? In Ant you'd have to <tar> up the source directories then copy over the
tarfile and untar.

Mind you, not sure if the tar task in Ant preserves file perms either but
you could always <exec> gnu tar perhaps?


Bye,

Les



-----Original Message-----
From: Stefan Bodewig
To: ant-user@jakarta.apache.org
Sent: 25/02/02 11:37
Subject: Re: file properites in copy task

On Mon, 25 Feb 2002, Tom Lister <tom.lister@ants.co.uk> wrote:

> I notice that files are losing the 'read-only' property in the
> process Is there a way to copy and preserve the file properties

No.

Java provides no API to query the permissions of a file (except for
File.canRead and File.canWrite which may return false for several
reasons) - therefore Ant doesn't know them and couldn't restore them,
even if Java provided an API to set the permissions.

> I want to avoid using chmod as the target directories will contain a
> mix of libary source and work in progress

Bad luck - better put together some smart patterns then.

Stefan

--
To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message