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 3.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual</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, if outfile is not specified.</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. <tr>
  45. <td valign="top">outfile</td>
  46. <td valign="top">List the contents of the archive into this file.</td>
  47. <td align="center" valign="top">Yes, if dest is not specified.</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">verbose</td>
  51. <td valign="top">Include file details when listing contents of
  52. the archive into outfile? Defaults to <I>false</I>.</td>
  53. <td align="center" valign="top">No</td>
  54. </tr>
  55. </table>
  56. <h3>Examples</h3>
  57. <blockquote>
  58. <p><code>&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;
  59. /&gt;</code></p>
  60. </blockquote>
  61. <blockquote>
  62. <p><code>
  63. &lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;<br>
  64. &lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
  65. </code></p>
  66. </blockquote>
  67. <blockquote>
  68. <p><pre>
  69. &lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
  70. dest=&quot;${tools.home}&quot;
  71. outfile=&quot;${outfile}&quot;
  72. vebose=&quot;on&quot;&gt;
  73. &lt;patternset&gt;
  74. &lt;include name=&quot;**/*.java&quot;/&gt;
  75. &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
  76. &lt;patternset/&gt;
  77. &lt;unzip/&gt;
  78. </pre></p>
  79. </blockquote>
  80. <blockquote>
  81. <p><pre>
  82. &lt;unzip dest=&quot;${tools.home}&quot;
  83. outfile=&quot;${outfile}&quot;
  84. vebose=&quot;on&quot;&gt;
  85. &lt;patternset&gt;
  86. &lt;include name=&quot;**/*.java&quot;/&gt;
  87. &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
  88. &lt;patternset/&gt;
  89. &lt;fileset dir=&quot;.&quot;&gt;
  90. &lt;include name=&quot;**/*.zip&quot;/&gt;
  91. &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
  92. &lt;fileset/&gt;
  93. &lt;unzip/&gt;
  94. </pre></p>
  95. </blockquote>
  96. <hr>
  97. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  98. Reserved.</p>
  99. </body>
  100. </html>