David, yes it is possible by using javascript:

<project>
    <scriptdef name="filesize" language="javascript">
        <attribute name="file"/>
        <attribute name="property"/>
        <![CDATA[
        importPackage(Packages.java.io);
        f = new File(attributes.get("file"));
       
project.setNewProperty(attributes.get("property"),
f.length());
        ]]>
    </scriptdef>
    <filesize file="filesize.xml"
property="filesize"/>
    <echo>$${filesize} is ${filesize}</echo>
</project>

HTH Ivan

--- David Kavanagh <[EMAIL PROTECTED]> wrote:

> I'm using ant for a J2ME project and I need to get
> the jar file size
> into my .jad file. So, I was looking for something
> in Ant that might
> let me read the size of a file into a property. I
> couldn't find
> anything! I have no problem writing a custom task,
> but I really hope
> there is something existing that will do this for
> me. Any ideas?
> 
> David
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________ 
Do you Yahoo!? 
Jazz up your holiday email with celebrity designs. Learn more. 
http://celebrity.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to