Prepend

Task available for testing only.
It has to be improved and may change.

Description

Task to prepend content to file.

Prepend task parameters

Attribute Description Value Required
file the file to read content from yes, if content is undefined
content the content yes, if no inner content (TODO)
tofile the file to append content to yes

Examples


<project name="prepend task"> 

  <taskdef name="prepend" 
     classname="net.sourceforge.ant4x.taskdefs.filesystem.PrependTask" 
     classpath="PATH/TO/ant4x.jar"/> 

  <target name="prepend"> 
    <prepend file="/path/to/file" content="MY CONTENT" />
    <prepend file="/path/to/file">
      MY CONTENT
    </prepend>
  </target> 

                    </project>