You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

touch.html 1.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="touch">Touch</a></h2>
  8. <h3>Description</h3>
  9. <p>Changes the modification time of a file and possibly creates it at
  10. the same time.</p>
  11. <p>For JDK 1.1 only the creation of new files with a modification time
  12. of now works, all other cases will emit a warning.</p>
  13. <h3>Parameters</h3>
  14. <table border="1" cellpadding="2" cellspacing="0">
  15. <tr>
  16. <td valign="top"><b>Attribute</b></td>
  17. <td valign="top"><b>Description</b></td>
  18. <td align="center" valign="top"><b>Required</b></td>
  19. </tr>
  20. <tr>
  21. <td valign="top">file</td>
  22. <td valign="top">the name of the file</td>
  23. <td valign="top" align="center">Yes</td>
  24. </tr>
  25. <tr>
  26. <td valign="top">millis</td>
  27. <td valign="top">specifies the new modification time of the file
  28. in milliseconds since midnight Jan 1 1970</td>
  29. <td valign="top" align="center">No</td>
  30. </tr>
  31. <tr>
  32. <td valign="top">datetime</td>
  33. <td valign="top">specifies the new modification time of the file
  34. in the format MM/DD/YYYY HH:MM AM_or_PM.</td>
  35. <td valign="top" align="center">No</td>
  36. </tr>
  37. </table>
  38. <p>If both <code>millis</code> and <code>datetime</code> are omitted
  39. the current time is assumed.</p>
  40. <h3>Examples</h3>
  41. <pre> &lt;touch file=&quot;myfile&quot;/&gt;</pre>
  42. <p>creates <code>myfile</code> if it doesn't exist and changes the
  43. modification time to the current time.</p>
  44. <pre> &lt;touch file=&quot;myfile&quot; datetime=&quot;06/28/2000 2:02 pm&quot;/&gt;</pre>
  45. <p>creates <code>myfile</code> if it doesn't exist and changes the
  46. modification time to Jun, 28 2000 2:02 pm (14:02 for those used to 24
  47. hour times).</p>
  48. <hr>
  49. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  50. Reserved.</p>
  51. </body>
  52. </html>