You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Manoj Sadangi <ms...@manh.com> on 2003/05/20 17:27:58 UTC

how to use java.io.File inside script

I am trying to read from a file and checking for a particular string inside
a line .
if the string exist then writing the line to the output file.
<script language="javascript"> <![CDATA[
        importClass(java.io.File);      
        importClass(java.io.FileWriter);      
        in = new File("sample.txt");
        outFile=new FileWriter("write1.txt");

what are the methods available for io operation?
I tried readLine and writeLine -- it does not work.


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