<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;The &lt;a href=&quot;http://phing.info/&quot;&gt;phing&lt;/a&gt; Header Task. To add a heading to a set of files.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Notice&lt;/strong&gt;: All destination files are overwritten!&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Attributes&lt;/h2&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;th&gt;Name&lt;/th&gt;
		&lt;th&gt;Type&lt;/th&gt;
		&lt;th&gt;Description&lt;/th&gt;
		&lt;th&gt;Default&lt;/th&gt;
		&lt;th&gt;Required&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;file&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;String&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;The location of the header file to load.&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;n/a&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;Yes&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;eol&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;String&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Specifies what the end of line character&lt;sup class=&quot;footnote&quot;&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;&lt;code&gt;PHP_EOL&lt;/code&gt;&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;No&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;preservelastmodified&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Boolean&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;To preserve the last modified time of all files.&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;false&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;No&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;failonerror&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Boolean&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Stop process if one error occurred.&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;true&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;No&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;verbose&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Boolean&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Log the files that are being modified.&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;false&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;No&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;encoding&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;String&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Specifies the encoding for header file.&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;&lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;No&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;toencoding&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;String&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;&quot;&gt;Specifies the encoding for the destination file(s).&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;&lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8&lt;/td&gt;
		&lt;td style=&quot;vertical-align:top;text-align:center;&quot;&gt;No&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;h2&gt;Supported Nested Tags&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://phing.info/docs/guide/current/chapters/appendixes/AppendixD-CoreTypes.html#Fileset&quot;&gt;Fileset&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;Add a heading to a single file&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- load the header task --&amp;gt;
&amp;lt;taskdef name=&quot;header&quot; classname=&quot;phing.tasks.ext.HeaderTask&quot; /&amp;gt;

&amp;lt;header
	file=&quot;${project.basedir}/LICENSE&quot;
	tofile=&quot;${project.basedir}/build/foo.txt&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Add a heading to a set of files&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- load the header task --&amp;gt;
&amp;lt;taskdef name=&quot;header&quot; classname=&quot;phing.tasks.ext.HeaderTask&quot; /&amp;gt;

&amp;lt;header file=&quot;${project.basedir}/LICENSE&quot;&amp;gt;
	&amp;lt;fileset dir=&quot;${project.basedir}/build&quot;&amp;gt;
		&amp;lt;include name=&quot;**/*.txt&quot; /&amp;gt;
		&amp;lt;exclude name=&quot;**/foo*.txt&quot; /&amp;gt;
	&amp;lt;/fileset&amp;gt;
&amp;lt;/header&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Add a heading encoded in &lt;span class=&quot;caps&quot;&gt;ISO&lt;/span&gt;-8859-1 to a file encoded in &lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- load the header task --&amp;gt;
&amp;lt;taskdef name=&quot;header&quot; classname=&quot;phing.tasks.ext.HeaderTask&quot; /&amp;gt;

&amp;lt;header
	file=&quot;${project.basedir}/LICENSE&quot;
	encoding=&quot;ISO-8859-1&quot;
	tofile=&quot;${project.basedir}/build/foo.txt&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Footnotes&lt;/h2&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt; Valid values for eol property are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;cr: a single CR&lt;/li&gt;
	&lt;li&gt;lf: a single LF&lt;/li&gt;
	&lt;li&gt;crlf: the pair &lt;span class=&quot;caps&quot;&gt;CRLF&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;mac: a single CR&lt;/li&gt;
	&lt;li&gt;unix: a single LF&lt;/li&gt;
	&lt;li&gt;dos: the pair &lt;span class=&quot;caps&quot;&gt;CRLF&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The default is platform dependent. For Unix platforms, the default is &amp;#8220;lf&amp;#8221;. For &lt;span class=&quot;caps&quot;&gt;DOS&lt;/span&gt; based systems (including Windows), the default is &amp;#8220;crlf&amp;#8221;. For Mac OS, the default is &amp;#8220;cr&amp;#8221;.&lt;/p&gt;
</body>
  <created-at type="datetime">2008-09-02T15:16:02-07:00</created-at>
  <id type="integer">51753</id>
  <permalink>headertask</permalink>
  <repository-id type="integer">48166</repository-id>
  <title>HeaderTask</title>
  <updated-at type="datetime">2008-09-06T14:42:25-07:00</updated-at>
  <user-id type="integer">22614</user-id>
</wiki>
