ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: How to unzip files and set read-only mode ?
Date Wed, 02 Feb 2005 09:46:26 GMT
On Wed, 02 Feb 2005, Yves Martin <> wrote:

> Of course, I would like that mechanism to be platform independant
> (UNIX, Win32, ...) - so the chmod does not suit my needs.

No way, sorry.

The best thing you can do is something like

<target name="os-check">
  <condition property="unix">
    <os family="unix"/>
  <condition property="windows">
    <os family="windows"/>
<target name="make-read-only-unix" if="unix" depends="os-check">
  <chmod .../>
<target name="make-read-only-windows" if="windows" depends="os-check">
  <attrib .../>
<target name="make-read-only"

> Does unzip preserve stored access rights when unpacking ?  Is it
> possible to set access rights in a zip with 'zip' task ?

It can't since it is implemented in Java and Java (at least 1.2)
doesn't provide any way to change file permissions.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message