ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Mukhar <kevin.muk...@corp.usa.net>
Subject Re: How to read a file's property
Date Wed, 21 Feb 2001 22:26:40 GMT
JCheng@bnyclearing.com wrote:
> 
> Does anyone know how to read file permission in ANT?
> 
> I am trying to accomplish this: delete a file or not based on the read-only

You could write a custom task. The current issue of JavaPro
(http://www.java-pro.com/) has an article about Ant in which the author
demonstrates a custom task to set a file's property to read-only. With
just a little modification you could probably change the task to do what
you need. Download the code at the link. The ReadOnly.java source is in
the file listing.txt which is in JP0103SH.zip which is in JP0103.zip

Mime
View raw message