Re: Ant - determine file size



On Tue, 16 Oct 2007 13:17:44 +0100, Andrew Thompson <u32984@uwe> wrote:

I would like to add the file size to a variety of JNLP
(XML) files that are generated by ant, as are the
(Jar) files themselves.

It confounds me that there seems to be no way in
ant, to retrieve the size of a file as an integer figure
of bytes.

Did I miss something? Either that provides that
functionality, or in the way ant works/is supposed to
work (e.g. write a custom task).

(BTW - ideally I am after an X-plat way, but for my own
purposes, even something 'exec' for Win. XP will do..)

http://ant.apache.org/manual/CoreTasks/length.html

Since Ant 1.6.3.

Dan.


--
Daniel Dyer
http://www.uncommons.org
.



Relevant Pages

  • Re: ant help - loop and retrieve problem
    ... to iterate through the directory and want to pass only n files to ... So it's like retrieve n files and pass to MY_TASK again retrieve next ... How can i implement in ant? ... files to a collecting directory. ...
    (comp.lang.java.programmer)
  • Re: Giving an application a window icon in a sensible way
    ... (revenue-generating, no doubt) ... From those who recommended getting Ant, ... I think when you tell Eclipse to make a JAR, ...
    (comp.lang.java.programmer)
  • Re: applet signing library
    ... >Hi i posted a while agoabout signing java applets. ... >with a gui front end that can jar, ... Here is an ant script to compile, jar, and sign an applet. ...
    (comp.lang.java.programmer)
  • Re: replace files in a jar...
    ... Is there a way to get ant to do ... > inside a jar without recreating the complete jar. ... A search of the Ant archives ... Or maybe someone will come along who has used the update flag in a Jar task ...
    (comp.lang.java.programmer)
  • Re: configuration management application
    ... The usual mode is to create a new JAR for a new build. ...  That is not an Ant ... Ant /could/ be set up to modify the properties file, ... modification to multiple targets. ...
    (comp.lang.java.programmer)