You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Robert MacMunn <Ro...@crd.com> on 2004/05/18 20:47:25 UTC

Question of checking file size

 
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
 

Re: Question of checking file size

Posted by Steve Loughran <st...@iseran.com>.
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


Re: Question of checking file size

Posted by Tarik El Berrak <ta...@travelsoft.fr>.
hi 
you can also create a new task which test the file size
see Writing your own task in apache web site

http://ant.apache.org/manual/index.html/

            Developing with Ant/

                        Writing Your Own Task



----- Original Message ----- 
From: "Robert MacMunn" <Ro...@crd.com>
To: <de...@ant.apache.org>
Sent: Tuesday, May 18, 2004 8:47 PM
Subject: Question of checking file size



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
 


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