ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert MacMunn" <RobertMacM...@crd.com>
Subject RE: Question of checking file size
Date Wed, 19 May 2004 14:09:40 GMT
Thanks Steve.
   What I did is run a perl script that passed the file size back to the
ant script, then used the loadfile task.

I am going to try to use just the load file task. It looks like if the
file is empty it doesn't set the property. Have to test it out though.

Thanks

Bob


-----Original Message-----
From: Steve Loughran [mailto:steve_l@iseran.com] 
Sent: Wednesday, May 19, 2004 4:54 AM
To: Ant Developers List
Subject: Re: Question of checking file size

Robert MacMunn wrote:
>  
> Hello,
>         I just started using Ant.  I was wondering if anyone could
tell
> me how to check a size of a file.
> I want to skip a process if a certain file is empty.
>  
> Thanks
>  
> Bob
>  
> 

There is nothing explicitly to do that. But there is a <filesmatch> 
condition. If you have a template file that is empty, you could match 
your target file against that, and so know if it is empty too.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message