Browse Source

Update the tempfile html page

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275784 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
91ec8221a4
2 changed files with 35 additions and 40 deletions
  1. +30
    -36
      docs/manual/CoreTasks/tempfile.html
  2. +5
    -4
      src/main/org/apache/tools/ant/taskdefs/TempFile.java

+ 30
- 36
docs/manual/CoreTasks/tempfile.html View File

@@ -18,7 +18,7 @@
<td valign="bottom"> <td valign="bottom">
<font size="+3" face="arial,helvetica,sanserif"><strong>Tempfile <font size="+3" face="arial,helvetica,sanserif"><strong>Tempfile
Task</strong></font> Task</strong></font>
<br><font face="arial,helvetica,sanserif">This task sets a property to the name of a temporary file.</font>
<br><font face="arial,helvetica,sanserif">This task sets a property to the name of a temporary file.</font>
</td> </td>
<td> <td>
<!-- PROJECT LOGO --> <!-- PROJECT LOGO -->
@@ -46,34 +46,24 @@
</td></tr> </td></tr>


<tr><td><blockquote> <tr><td><blockquote>
This task sets a property to the name of a temporary file.
Unlike the Java1.2 method to create a temporary file, this task
does work on Java1.1. Also, it does not actually create the
temporary file, but it does guarantee that the file did not
exist when the task was executed.
<p>
Examples
<pre>&lt;tempfile property="temp.file" /&gt;</pre>
create a temporary file
<pre>&lt;tempfile property="temp.file" suffix=".xml" /&gt;</pre>
create a temporary file with the .xml suffix.
<pre>&lt;tempfile property="temp.file" destDir="build"/&gt;</pre>
create a temp file in the build subdir
This task sets a property to the name of a temporary file. Unlike the Java1.2 method to create a temporary file, this task does work on Java1.1. Also, it does not actually create the temporary file, but it does guarantee that the file did not exist when the task was executed. <p> Examples <pre>&lt;tempfile property="temp.file" /&gt;</pre> create a temporary file <pre>&lt;tempfile property="temp.file" suffix=".xml" /&gt;</pre> create a temporary file with the .xml suffix. <pre>&lt;tempfile property="temp.file" destDir="build"/&gt;</pre> create a temp file in the build subdir
</blockquote></td></tr> </blockquote></td></tr>


</table> </table>
<!-- End Description --> <!-- End Description -->


<!-- Ignore -->



<!-- Start Attributes --> <!-- Start Attributes -->
<table border="0" cellspacing="0" cellpadding="2" width="100%"> <table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr> <tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76"> <tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif"> <font color="#ffffff" face="arial,helvetica.sanserif">
<a name="attributes"> <a name="attributes">
<strong>Parameters</strong></a></font> <strong>Parameters</strong></a></font>
</td></tr> </td></tr>

<tr><td><blockquote> <tr><td><blockquote>
<table> <table>
<tr> <tr>
@@ -85,46 +75,51 @@
</td> </td>
<td bgcolor="#cccccc" valign="top" align="left"> <td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font>
</td> </td>
</tr> </tr>
<!-- Attribute -->
<!-- Attribute Group -->
<!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">destDir</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">property</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
destination directory. If null,
the parent directory is used instead
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the property you wish to assign the temporary file to.</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left" rowspan="1">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Required</font>
</td> </td>
</tr> </tr>
<!-- Attribute -->

<!-- Attribute Group -->
<!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">prefix</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">destdir</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
optional prefix string
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the destination directory. If not set, the basedir directory is used instead.</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left" rowspan="3">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font>
</td> </td>
</tr> </tr>
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">property</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">prefix</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The property you wish to assign the temporary file to
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the optional prefix string for the temp file.</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
@@ -136,15 +131,14 @@ the parent directory is used instead
<font color="#000000" size="-1" face="arial,helvetica,sanserif">suffix</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">suffix</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Suffix string for the temp file (optional)
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the optional suffix string for the temp file.</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td> </td>
</tr> </tr>



</table> </table>
</blockquote></td></tr> </blockquote></td></tr>




+ 5
- 4
src/main/org/apache/tools/ant/taskdefs/TempFile.java View File

@@ -104,6 +104,7 @@ public class TempFile extends Task {
* Sets the property you wish to assign the temporary file to. * Sets the property you wish to assign the temporary file to.
* *
* @param property The property to set * @param property The property to set
* @ant.attribute group="required"
*/ */
public void setProperty(String property) { public void setProperty(String property) {
this.property = property; this.property = property;
@@ -111,8 +112,8 @@ public class TempFile extends Task {




/** /**
* Sets the destination directory. If null,
* the parent directory is used instead.
* Sets the destination directory. If not set,
* the basedir directory is used instead.
* *
* @param destDir The new destDir value * @param destDir The new destDir value
*/ */
@@ -122,7 +123,7 @@ public class TempFile extends Task {




/** /**
* Sets the optional prefix string.
* Sets the optional prefix string for the temp file.
* *
* @param prefix string to prepend to generated string * @param prefix string to prepend to generated string
*/ */
@@ -132,7 +133,7 @@ public class TempFile extends Task {




/** /**
* Sets the suffix string for the temp file (optional)
* Sets the optional suffix string for the temp file.
* *
* @param suffix suffix including any "." , e.g ".xml" * @param suffix suffix including any "." , e.g ".xml"
*/ */


Loading…
Cancel
Save