ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhavin Patel <bpa...@go2.com>
Subject Javascript and some bad foo
Date Tue, 05 Jun 2001 18:36:00 GMT
I'm hoping one of you intelligent people could help me out on this one,

I have a directory of files which have tokens in them in which I need to
replace.
I would like to use the Mapper and Filter in javascript...I know this sounds
like a bad idea :)

But this is what I have so far:

        <script language="javascript"> <![CDATA[

        var filter  = web.createTask( "filter" );
        var copy    = web.createTask( "copy" );
        var fileset = web.createDataType( "fileset" );

        var srcDir   = new java.io.File( "d:\\srcdir" );
        var destDir = new java.io.File( "d:\\destdir" );

        filter.setToken( "__CARRIER__" );
        filter.setValue( "replacewith"  );
	
        buildCarriers.addFilter( filter );

        fileset.setDir(srcDir);
        fileset.setIncludes("*.src")

        copy.setTodir( destDir );
        copy.addFileset(fileset);
        copy.setFiltering( true );

        buildcarriers.addTask(copy);
       
        ]]></script>

Now with this the copy actually works, but the filtering doesn't seem to
work.
And furthermore I have no idea where to place the Mapper

Any clues/hints in the right direction would be greatly appreciated and
rewarded with a smile :)

Mime
View raw message