mbenson 2004/03/31 13:47:42 Added: docs/manual/CoreTypes redirector.html Log: Forgot manual page. Revision Changes Path 1.1 ant/docs/manual/CoreTypes/redirector.html Index: redirector.html =================================================================== <html> <head> <meta http-equiv="Content-Language" content="en-us"> <title>Redirector Type</title> </head> <body> <h2><a name="redirector">I/O redirection</a></h2> <p>For many tasks, input and output can be defined in a fairly straightforward fashion. The <a href="../CoreTasks/exec.html">exec</a> task, used to execute an external process, stands as a very basic example. The executed process may accept input, produce output, or do either or both depending upon various circumstances. Output may be classified as "output" or as "error output." The <redirector> type provides a concrete means of redirecting input and output featuring the use of <a href="./mapper.html">File Mapper</a>s to specify source (input) and destination (output/error) files. <em>Since Ant 1.6.2</em> <p>The <code><redirector></code> element accepts the following attributes:</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">output</td> <td valign="top">Name of a file to which to write the output. If the error stream is not also redirected to a file or property, it will appear in this output.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">error</td> <td valign="top">The file to which the standard error of the command should be redirected.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">logError</td> <td valign="top">This attribute is used when you wish to see error output in Ant's log and you are redirecting output to a file/property. The error output will not be included in the output file/property. If you redirect error with the <i>error</i> or <i>errorProperty</i> attributes, this will have no effect.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">append</td> <td valign="top">Whether output and error files should be appended to or overwritten. Defaults to <code>false</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">createemptyfiles</td> <td valign="top">Whether output and error files should be created even when empty. Defaults to <code>true</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">outputproperty</td> <td valign="top">The name of a property in which the output of the command should be stored. Unless the error stream is redirected to a separate file or stream, this property will include the error output.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">errorproperty</td> <td valign="top">The name of a property in which the standard error of the command should be stored.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">input</td> <td valign="top">A file from which the executed command's standard input is taken. This attribute is mutually exclusive with the <i>inputstring</i> attribute.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">inputstring</td> <td valign="top">A string which serves as the input stream for the executed command. This attribute is mutually exclusive with the <i>input</i> attribute.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">inputencoding</td> <td valign="top">The input encoding.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">outputencoding</td> <td valign="top">The output encoding.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">errorencoding</td> <td valign="top">The error encoding.</td> <td align="center" valign="top">No</td> </tr> </table> <h3>Parameters specified as nested elements</h3> <h4>inputmapper</h4> <p>A single <a href="./mapper.html">File Mapper</a> used to redirect process input. Multiple mapping results should concatenate all mapped files as input. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <inputmapper> is not compatible with either of the <i>input</i> or <i>inputstring</i> attributes.</p> <h4>outputmapper</h4> <p>A single <a href="./mapper.html">File Mapper</a> used to redirect process output. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <outputmapper> is not compatible with the <i>output</i> attribute.</p> <h4>errormapper</h4> <p>A single <a href="./mapper.html">File Mapper</a> used to redirect error output. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <errormapper> is not compatible with the <i>error</i> attribute.</p> <h4>inputfilterchain</h4> <p>One or more <a href="./filterchain.html">FilterChain</a>s can be applied to the process input.</p> <h4>outputfilterchain</h4> <p>One or more <a href="./filterchain.html">FilterChain</a>s can be applied to the process output.</p> <h4>errorfilterchain</h4> <p>One or more <a href="./filterchain.html">FilterChain</a>s can be applied to the error output.</p> <h3>Usage</h3> Tasks known to support I/O redirection: <ul> <li><a href="../CoreTasks/exec.html">Exec</a></li> <li><a href="../CoreTasks/apply.html">Apply</a></li> <li><a href="../CoreTasks/java.html">Java</a></li> </ul> <p>The expected behavior of a <redirector> is to a great degree dependent on the supporting task. Any possible points of confusion should be noted at the task level. <hr /> <p align="center">Copyright © 2004 The Apache Software Foundation. All rights Reserved.</p> </body> </html>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]