1) documentation.
2) default to String type if type is omitted.
3) use Properties.store (or .save) to write the property file.
Submitted by: Jesse Tilly <JTilly@hoteltools.com>
I've modified Jesse's original patch to make it compile on JDK 1.1.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268153 13f79535-47bb-0310-9956-ffa450edef68
<td valign="top">Name of the property name/value pair</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">value</td>
<td valign="top">Value to set for the key the property name/value pair</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">type</td>
<td valign="top">Manipulate the value as type: int, date</td>
<td valign="top" align="center">No, but must be used if opertion attribute used</td>
</tr>
<tr>
<td valign="top">operation</td>
<td valign="top">If type is date, this cane be "now" or "never". If the type is int, only "-" and "+" may be used.</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Examples</h3>
<p>The following changes the my.properties file. Assume my.properties look like:<br>
<p>
<ul># A comment<br>
akey=novalue<br></ul>
</p>
After running, the file would now look like
<p>
<ul>#Thu Nov 02 23:41:47 EST 2000<br>
akey=avalue<br>
adate=2000/11/02 23\:41<br>
anint=1<br></ul>
</p>
The slashes conform to the expectations of the Properties class. The file will be stored in a manner so that each character is examined and escaped if necessary. Note that the original comment is now lost. Please keep this in mind when running this task against heavily commented properties files. It may be best to have a commented version in the source tree, copy it to a deployment area, and then run the modifications on the copy. Future versions of PropertyFile will hopefully eliminate this shortcoming.
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.