Or you could use Antelope's (antelope.tigris.org)
fileutils task (lastmodified operation).  Now Dale
won't have to plug it himself.  >;)

HTH,
Matt

--- [EMAIL PROTECTED] wrote:

> AFIK there is none in Ant or AC - maybe there is an
> external task. 
> But you could use scripting for that. I modified an
> old example for getting the filesize:
> 
> <project>
> 
>     <scriptdef name="getfd" language="javascript">
>         <attribute name="file"/>
>         <attribute name="property"/>
>         <![CDATA[
>             fileName = attributes.get("file");
>             propName = attributes.get("property");
> 
>             file = new java.io.File(fileName);
>             date =
>
java.text.DateFormat.getDateTimeInstance().format(new
> java.util.Date(file.lastModified()));
>             
>             project.setNewProperty(propName, date);
>         ]]>
>     </scriptdef>
> 
>     <getfd file="build.xml"
> property="buildfile.date"/>
>     <echo>date of buildfile is
> ${buildfile.date}</echo>
> 
> </project>
> 
> 
> 
> Jan
> 
> >-----Ursprüngliche Nachricht-----
> >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> >Gesendet: Donnerstag, 4. Mai 2006 07:20
> >An: Ant Users List
> >Betreff: TimeStamp
> >
> >
> >hi ,
> >
> >can anyone tell me how can i get the timestamp of a
> file in a 
> >property..i am not getting the task for it.
> >
> >
> >Ankur Agarwal
> >Tata Consultancy Services Limited
> >Mailto: [EMAIL PROTECTED]
> >Website: http://www.tcs.com
> >
> >Notice: The information contained in this e-mail
> message 
> >and/or attachments to it may contain confidential
> or 
> >privileged information.   If you are not the
> intended 
> >recipient, any dissemination, use, review,
> distribution, 
> >printing or copying of the information contained in
> this 
> >e-mail message and/or attachments to it are
> strictly 
> >prohibited.   If you have received this
> communication in 
> >error, please notify us by reply e-mail or
> telephone and 
> >immediately and permanently delete the message and
> any 
> >attachments.  Thank you
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to