|
5 | 5 | <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
6 | 6 | <link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
|
7 | 7 | <link rel="stylesheet" href="../../print.css" type="text/css" media="print">
|
8 |
| -<meta content="ZipArchive,air.utils.ZipArchive,entries,load,save,createFromFolder,extractFiles,removeEntry,findEntry,addFilesAsync,extractFilesAsync" name="keywords"> |
| 8 | +<meta content="ZipArchive,air.utils.ZipArchive,entries,load,save,loadFromByteArray,saveToByteArray,createFromFolder,extractFiles,removeEntry,findEntry,addFilesAsync,extractFilesAsync" name="keywords"> |
9 | 9 | <title>air.utils.ZipArchive (ActionScript 3.0)</title>
|
10 | 10 | </head>
|
11 | 11 | <body>
|
|
190 | 190 | <tr class="">
|
191 | 191 | <td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol">
|
192 | 192 | <div class="summarySignature">
|
193 |
| -<a class="signatureLink" href="#addFilesAsync()">addFilesAsync</a>(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true):<a href="../../specialTypes.html#void">void</a> |
| 193 | +<a class="signatureLink" href="#addFilesAsync()">addFilesAsync</a>(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true, includeFolderEntries:<a href="../../Boolean.html">Boolean</a> = false, followLinks:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a> |
194 | 194 | </div>
|
195 | 195 | <div class="summaryTableDescription">
|
196 | 196 |
|
|
200 | 200 | <tr class="">
|
201 | 201 | <td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol">
|
202 | 202 | <div class="summarySignature">
|
203 |
| -<a class="signatureLink" href="#createFromFolder()">createFromFolder</a>(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true):<a href="../utils/ZipArchive.html">ZipArchive</a> |
| 203 | +<a class="signatureLink" href="#createFromFolder()">createFromFolder</a>(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true, includeFolderEntries:<a href="../../Boolean.html">Boolean</a> = false, followLinks:<a href="../../Boolean.html">Boolean</a> = false):<a href="../utils/ZipArchive.html">ZipArchive</a> |
204 | 204 | </div>
|
205 | 205 | <div class="summaryTableDescription">[static]
|
206 | 206 |
|
|
288 | 288 | Creates a new ZipArchive object by loading in data from a file.</div>
|
289 | 289 | </td><td class="summaryTableOwnerCol">ZipArchive</td>
|
290 | 290 | </tr>
|
| 291 | +<tr class=""> |
| 292 | +<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> |
| 293 | +<div class="summarySignature"> |
| 294 | +<a class="signatureLink" href="#loadFromByteArray()">loadFromByteArray</a>(data:<a href="../../flash/utils/ByteArray.html">ByteArray</a>):<a href="../utils/ZipArchive.html">ZipArchive</a> |
| 295 | +</div> |
| 296 | +<div class="summaryTableDescription">[static] |
| 297 | + |
| 298 | + Creates a new ZipArchive object by loading in data from a byte array.</div> |
| 299 | +</td><td class="summaryTableOwnerCol">ZipArchive</td> |
| 300 | +</tr> |
291 | 301 | <tr class="hideInheritedMethod">
|
292 | 302 | <td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
|
293 | 303 | <div class="summarySignature">
|
|
327 | 337 | Saves a ZipArchive object to a file.</div>
|
328 | 338 | </td><td class="summaryTableOwnerCol">ZipArchive</td>
|
329 | 339 | </tr>
|
| 340 | +<tr class=""> |
| 341 | +<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> |
| 342 | +<div class="summarySignature"> |
| 343 | +<a class="signatureLink" href="#saveToByteArray()">saveToByteArray</a>(bytes:<a href="../../flash/utils/ByteArray.html">ByteArray</a>):<a href="../../uint.html">uint</a> |
| 344 | +</div> |
| 345 | +<div class="summaryTableDescription"> |
| 346 | + |
| 347 | + Saves a ZipArchive object to a byte array.</div> |
| 348 | +</td><td class="summaryTableOwnerCol">ZipArchive</td> |
| 349 | +</tr> |
330 | 350 | <tr class="hideInheritedMethod">
|
331 | 351 | <td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
|
332 | 352 | <div class="summarySignature">
|
|
491 | 511 | </tr>
|
492 | 512 | </table>
|
493 | 513 | <div class="detailBody">
|
494 |
| -<code>public function addFilesAsync(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true):<a href="../../specialTypes.html#void">void</a></code> |
| 514 | +<code>public function addFilesAsync(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true, includeFolderEntries:<a href="../../Boolean.html">Boolean</a> = false, followLinks:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></code> |
495 | 515 | <p></p>
|
496 | 516 | <table border="0" cellspacing="0" cellpadding="0">
|
497 | 517 | <tr>
|
|
549 | 569 | <td width="20px"></td><td><code><span class="label">compress</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>true</code>)<code></code> — Whether or not to compress the files (if false, files are just stored).
|
550 | 570 |
|
551 | 571 |
|
| 572 | + </td> |
| 573 | +</tr> |
| 574 | +<tr> |
| 575 | +<td class="paramSpacer"> </td> |
| 576 | +</tr> |
| 577 | +<tr> |
| 578 | +<td width="20px"></td><td><code><span class="label">includeFolderEntries</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> — Whether or not to include entries in the archive for each folder. |
| 579 | + |
| 580 | + This can be used to ensure empty folders are generated when unzipping: otherwise, folders are |
| 581 | + |
| 582 | + only created if they contain a file that is in the archive. |
| 583 | + |
| 584 | + |
| 585 | + </td> |
| 586 | +</tr> |
| 587 | +<tr> |
| 588 | +<td class="paramSpacer"> </td> |
| 589 | +</tr> |
| 590 | +<tr> |
| 591 | +<td width="20px"></td><td><code><span class="label">followLinks</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> — Whether or not to follow a symbolic link and include the contents of the target |
| 592 | + |
| 593 | + file. By default, links are stored as links, but this can cause problems when unzipping on a Windows |
| 594 | + |
| 595 | + platform where a link turns into a file that just has contents being the relative path to the target |
| 596 | + |
| 597 | + file. If this is set to true, then any links are stored as the contents of the file that is linked to. |
| 598 | + |
| 599 | + |
552 | 600 | </td>
|
553 | 601 | </tr>
|
554 | 602 | </table>
|
|
570 | 618 | </tr>
|
571 | 619 | </table>
|
572 | 620 | <div class="detailBody">
|
573 |
| -<code>public static function createFromFolder(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true):<a href="../utils/ZipArchive.html">ZipArchive</a></code> |
| 621 | +<code>public static function createFromFolder(folder:<a href="../../flash/filesystem/File.html">File</a>, recurse:<a href="../../Boolean.html">Boolean</a> = true, compress:<a href="../../Boolean.html">Boolean</a> = true, includeFolderEntries:<a href="../../Boolean.html">Boolean</a> = false, followLinks:<a href="../../Boolean.html">Boolean</a> = false):<a href="../utils/ZipArchive.html">ZipArchive</a></code> |
574 | 622 | <p></p>
|
575 | 623 | <table border="0" cellspacing="0" cellpadding="0">
|
576 | 624 | <tr>
|
|
614 | 662 | <td width="20px"></td><td><code><span class="label">compress</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>true</code>)<code></code> — Whether or not to compress the files (if false, files are just stored).
|
615 | 663 |
|
616 | 664 |
|
| 665 | + </td> |
| 666 | +</tr> |
| 667 | +<tr> |
| 668 | +<td class="paramSpacer"> </td> |
| 669 | +</tr> |
| 670 | +<tr> |
| 671 | +<td width="20px"></td><td><code><span class="label">includeFolderEntries</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> — Whether or not to include entries in the archive for each folder. |
| 672 | + |
| 673 | + This can be used to ensure empty folders are generated when unzipping: otherwise, folders are |
| 674 | + |
| 675 | + only created if they contain a file that is in the archive. |
| 676 | + |
| 677 | + |
| 678 | + </td> |
| 679 | +</tr> |
| 680 | +<tr> |
| 681 | +<td class="paramSpacer"> </td> |
| 682 | +</tr> |
| 683 | +<tr> |
| 684 | +<td width="20px"></td><td><code><span class="label">followLinks</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> — Whether or not to follow a symbolic link and include the contents of the target |
| 685 | + |
| 686 | + file. By default, links are stored as links, but this can cause problems when unzipping on a Windows |
| 687 | + |
| 688 | + platform where a link turns into a file that just has contents being the relative path to the target |
| 689 | + |
| 690 | + file. If this is set to true, then any links are stored as the contents of the file that is linked to. |
| 691 | + |
| 692 | + |
617 | 693 | </td>
|
618 | 694 | </tr>
|
619 | 695 | </table>
|
|
863 | 939 | or if the file is not a valid Zip archive.
|
864 | 940 |
|
865 | 941 |
|
| 942 | + </td> |
| 943 | +</tr> |
| 944 | +</table> |
| 945 | +</div> |
| 946 | +<a name="loadFromByteArray()"></a> |
| 947 | +<table cellspacing="0" cellpadding="0" class="detailHeader"> |
| 948 | +<tr> |
| 949 | +<td class="detailHeaderName">loadFromByteArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td> |
| 950 | +</tr> |
| 951 | +</table> |
| 952 | +<div class="detailBody"> |
| 953 | +<code>public static function loadFromByteArray(data:<a href="../../flash/utils/ByteArray.html">ByteArray</a>):<a href="../utils/ZipArchive.html">ZipArchive</a></code> |
| 954 | +<p></p> |
| 955 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 956 | +<tr> |
| 957 | +<td valign="top" style="white-space:nowrap"><b>Language version: </b></td><td>ActionScript 3.0 |
| 958 | + </td> |
| 959 | +</tr> |
| 960 | +</table> |
| 961 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 962 | +<tr> |
| 963 | +<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 51 |
| 964 | + |
| 965 | +</td> |
| 966 | +</tr> |
| 967 | +</table> |
| 968 | +<p></p><p> |
| 969 | + |
| 970 | + Creates a new ZipArchive object by loading in data from a byte array. |
| 971 | + |
| 972 | + |
| 973 | + </p><span class="label">Parameters</span> |
| 974 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 975 | +<tr> |
| 976 | +<td width="20px"></td><td><code><span class="label">data</span>:<a href="../../flash/utils/ByteArray.html">ByteArray</a></code> — The <code>ByteArray</code> object that contains a valid zip archive. |
| 977 | + |
| 978 | + |
| 979 | + </td> |
| 980 | +</tr> |
| 981 | +</table> |
| 982 | +<p></p> |
| 983 | +<span class="label">Returns</span> |
| 984 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 985 | +<tr> |
| 986 | +<td width="20"></td><td><code><a href="../utils/ZipArchive.html">ZipArchive</a></code> — |
| 987 | + The ZipArchive object with entries populated from the zip central directory. |
| 988 | + |
| 989 | + |
| 990 | + |
| 991 | + |
| 992 | + </td> |
| 993 | +</tr> |
| 994 | +</table> |
| 995 | +<br> |
| 996 | +<span class="label">Throws</span> |
| 997 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 998 | +<tr> |
| 999 | +<td width="20"></td><td><code><a href="../../Error.html">Error</a> </code> — If the data is not a valid Zip archive. |
| 1000 | + |
| 1001 | + |
866 | 1002 | </td>
|
867 | 1003 | </tr>
|
868 | 1004 | </table>
|
|
979 | 1115 | </tr>
|
980 | 1116 | </table>
|
981 | 1117 | </div>
|
| 1118 | +<a name="saveToByteArray()"></a> |
| 1119 | +<table cellspacing="0" cellpadding="0" class="detailHeader"> |
| 1120 | +<tr> |
| 1121 | +<td class="detailHeaderName">saveToByteArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td> |
| 1122 | +</tr> |
| 1123 | +</table> |
| 1124 | +<div class="detailBody"> |
| 1125 | +<code>public function saveToByteArray(bytes:<a href="../../flash/utils/ByteArray.html">ByteArray</a>):<a href="../../uint.html">uint</a></code> |
| 1126 | +<p></p> |
| 1127 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 1128 | +<tr> |
| 1129 | +<td valign="top" style="white-space:nowrap"><b>Language version: </b></td><td>ActionScript 3.0 |
| 1130 | + </td> |
| 1131 | +</tr> |
| 1132 | +</table> |
| 1133 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 1134 | +<tr> |
| 1135 | +<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 51 |
| 1136 | + |
| 1137 | +</td> |
| 1138 | +</tr> |
| 1139 | +</table> |
| 1140 | +<p></p><p> |
| 1141 | + |
| 1142 | + Saves a ZipArchive object to a byte array. |
| 1143 | + |
| 1144 | + |
| 1145 | + </p><span class="label">Parameters</span> |
| 1146 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 1147 | +<tr> |
| 1148 | +<td width="20px"></td><td><code><span class="label">bytes</span>:<a href="../../flash/utils/ByteArray.html">ByteArray</a></code> — The <code>ByteArray</code> object into which to write the zip archive data. |
| 1149 | + |
| 1150 | + Data will be written from the current position into the ByteArray which will be expanded |
| 1151 | + |
| 1152 | + as required to ensure it fits the zip archive content. |
| 1153 | + |
| 1154 | + |
| 1155 | + </td> |
| 1156 | +</tr> |
| 1157 | +</table> |
| 1158 | +<p></p> |
| 1159 | +<span class="label">Returns</span> |
| 1160 | +<table border="0" cellspacing="0" cellpadding="0"> |
| 1161 | +<tr> |
| 1162 | +<td width="20"></td><td><code><a href="../../uint.html">uint</a></code> — |
| 1163 | + The number of bytes of the zip archive that were written to the byte array. |
| 1164 | + |
| 1165 | + |
| 1166 | + |
| 1167 | + |
| 1168 | + </td> |
| 1169 | +</tr> |
| 1170 | +</table> |
| 1171 | +</div> |
982 | 1172 | <br>
|
983 | 1173 | <br>
|
984 | 1174 | <hr>
|
985 | 1175 | <br>
|
986 | 1176 | <p></p>
|
987 | 1177 | <div class="feedbackLink">
|
988 | 1178 | <center>
|
989 |
| -<a href=" mailto:[email protected]?subject=ASLR Feedback(Mon Feb 26 2024, 5:22 PM GMT) : air.utils.ZipArchive" >Submit Feedback </a> |
| 1179 | +<a href=" mailto:[email protected]?subject=ASLR Feedback(Thu Mar 21 2024, 10:06 AM GMT) : air.utils.ZipArchive" >Submit Feedback </a> |
990 | 1180 | </center>
|
991 | 1181 | </div>
|
992 |
| -<center class="copyright"> © 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Mon Feb 26 2024, 5:22 PM GMT<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center> |
| 1182 | +<center class="copyright"> © 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Thu Mar 21 2024, 10:06 AM GMT<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center> |
993 | 1183 | </div>
|
994 | 1184 | </body>
|
995 | 1185 | </html>
|
996 |
| -<!-- © 2004-2022 Adobe Systems Incorporated. All rights reserved. Mon Feb 26 2024, 5:22 PM GMT <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> --> |
| 1186 | +<!-- © 2004-2022 Adobe Systems Incorporated. All rights reserved. Thu Mar 21 2024, 10:06 AM GMT <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> --> |
0 commit comments