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.

unzip.html 2.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Unzip Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2>
  8. <h3>Description</h3>
  9. <p>Unzips a zip-, war-, tar- or jarfile.</p>
  10. <p>For JDK 1.1 &quot;last modified time&quot; field is set to current time instead of being
  11. carried from the archive file.</p>
  12. <p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select files to extract
  13. <I>from</I> the archive. If no patternset is used, all files are extracted.
  14. </p>
  15. <p><a href="../CoreTypes/fileset.html">FileSet</a>s may be used used to select archived files
  16. to perform unarchival upon.
  17. </p>
  18. <p>File permissions will not be restored on extracted files.</p>
  19. <p>The untar task recognizes the long pathname entries used by GNU tar.<p>
  20. <h3>Parameters</h3>
  21. <table border="1" cellpadding="2" cellspacing="0">
  22. <tr>
  23. <td valign="top"><b>Attribute</b></td>
  24. <td valign="top"><b>Description</b></td>
  25. <td align="center" valign="top"><b>Required</b></td>
  26. </tr>
  27. <tr>
  28. <td valign="top">src</td>
  29. <td valign="top">archive file to expand.</td>
  30. <td align="center" valign="top">Yes, if filesets are not used.</td>
  31. </tr>
  32. <tr>
  33. <td valign="top">dest</td>
  34. <td valign="top">directory where to store the expanded files.</td>
  35. <td align="center" valign="top">Yes</td>
  36. </tr>
  37. <tr>
  38. <td valign="top">overwrite</td>
  39. <td valign="top">Overwrite files, even if they are newer than the
  40. corresponding entries in the archive (true or false, default is
  41. true).</td>
  42. <td align="center" valign="top">No</td>
  43. </tr>
  44. </table>
  45. <h3>Examples</h3>
  46. <blockquote>
  47. <p><code>&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;
  48. /&gt;</code></p>
  49. </blockquote>
  50. <blockquote>
  51. <p><code>
  52. &lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;<br>
  53. &lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
  54. </code></p>
  55. </blockquote>
  56. <blockquote>
  57. <p><pre>
  58. &lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
  59. dest=&quot;${tools.home}&quot;&gt;
  60. &lt;patternset&gt;
  61. &lt;include name=&quot;**/*.java&quot;/&gt;
  62. &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
  63. &lt;patternset/&gt;
  64. &lt;unzip/&gt;
  65. </pre></p>
  66. </blockquote>
  67. <blockquote>
  68. <p><pre>
  69. &lt;unzip dest=&quot;${tools.home}&quot;&gt;
  70. &lt;patternset&gt;
  71. &lt;include name=&quot;**/*.java&quot;/&gt;
  72. &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
  73. &lt;patternset/&gt;
  74. &lt;fileset dir=&quot;.&quot;&gt;
  75. &lt;include name=&quot;**/*.zip&quot;/&gt;
  76. &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
  77. &lt;fileset/&gt;
  78. &lt;unzip/&gt;
  79. </pre></p>
  80. </blockquote>
  81. <hr>
  82. <p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
  83. Reserved.</p>
  84. </body>
  85. </html>