/aosp_15_r20/external/python/cpython2/Lib/test/ |
D | test_zipfile.py | 12 import zipfile 45 self.line_gen = ["Zipfile test line %d. random float: %f" % (i, random()) 55 with zipfile.ZipFile(f, "w", compression) as zipfp: 64 with zipfile.ZipFile(f, "r", compression) as zipfp: 120 self.zip_test(f, zipfile.ZIP_STORED) 126 with zipfile.ZipFile(f, "r", compression) as zipfp: 148 self.zip_open_test(f, zipfile.ZIP_STORED) 152 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp: 158 with zipfile.ZipFile(TESTFN2, "r") as zipfp: 174 with zipfile.ZipFile(f, "r", compression) as zipfp: [all …]
|
D | test_zipfile64.py | 1 # Tests of the full ZIP64 functionality of zipfile 20 import zipfile, os, unittest 38 line_gen = ("Test of zipfile line %d." % i for i in xrange(1000000)) 48 zipfp = zipfile.ZipFile(f, "w", compression, allowZip64=True) 67 zipfp = zipfile.ZipFile(f, "r", compression) 83 self.zipTest(f, zipfile.ZIP_STORED) 85 self.zipTest(TESTFN2, zipfile.ZIP_STORED) 92 self.zipTest(f, zipfile.ZIP_DEFLATED) 94 self.zipTest(TESTFN2, zipfile.ZIP_DEFLATED) 105 # and that the resulting archive can be read properly by ZipFile [all …]
|
/aosp_15_r20/external/python/cpython3/Lib/test/ |
D | test_zipfile.py | 17 import zipfile 56 cls.line_gen = [bytes("Zipfile test line %d. random float: %f\n" % 69 with zipfile.ZipFile(f, "w", **kwargs) as zipfp: 81 with zipfile.ZipFile(f, "r", compression) as zipfp: 139 with zipfile.ZipFile(f, "r", compression) as zipfp: 166 with zipfile.ZipFile(path, "r", self.compression) as zipfp: 173 with zipfile.ZipFile(f, "r", compression) as zipfp: 192 with zipfile.ZipFile(f, "r") as zipfp, \ 211 with zipfile.ZipFile(f, "r") as zipfp, \ 231 with zipfile.ZipFile(f, "r") as zipfp, \ [all …]
|
D | test_zipfile64.py | 1 # Tests of the full ZIP64 functionality of zipfile 14 import zipfile, os, unittest 32 line_gen = ("Test of zipfile line %d." % i for i in range(1000000)) 41 with zipfile.ZipFile(f, "w", compression) as zipfp: 59 with zipfile.ZipFile(f, "r", compression) as zipfp: 74 self.zipTest(f, zipfile.ZIP_STORED) 76 self.zipTest(TESTFN2, zipfile.ZIP_STORED) 83 self.zipTest(f, zipfile.ZIP_DEFLATED) 85 self.zipTest(TESTFN2, zipfile.ZIP_DEFLATED) 96 # and that the resulting archive can be read properly by ZipFile [all …]
|
/aosp_15_r20/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ZipUtil.java | 45 import java.util.zip.ZipFile; 70 * @param zipFile the {@link File} to check 76 public static boolean isZipFileValid(File zipFile, boolean thorough) throws IOException { in isZipFileValid() argument 77 if (zipFile == null) { in isZipFileValid() 81 if (!zipFile.exists()) { in isZipFileValid() 82 CLog.d("Zip file does not exist: %s", zipFile.getAbsolutePath()); in isZipFileValid() 86 try (ZipFile z = new ZipFile(zipFile)) { in isZipFileValid() 89 final File extractDir = FileUtil.createTempDir("extract-" + zipFile.getName()); in isZipFileValid() 98 CLog.d("Detected corrupt zip file %s:", zipFile.getCanonicalPath()); in isZipFileValid() 109 * @param zipFile the {@link ZipFile} to extract [all …]
|
D | ZipUtil2.java | 23 import org.apache.commons.compress.archivers.zip.ZipFile; 42 * @param entry the entry inside zipfile (potentially contains mode info) 60 * @param zipFile the {@link ZipFile} to extract 66 private static boolean extractZipEntry(ZipFile zipFile, ZipArchiveEntry entry, File destFile) in extractZipEntry() argument 68 FileUtil.writeToFile(zipFile.getInputStream(entry), destFile); in extractZipEntry() 75 * @param zipFile the {@link ZipFile} to extract 79 public static void extractZip(ZipFile zipFile, File destDir) throws IOException { in extractZip() argument 80 Enumeration<? extends ZipArchiveEntry> entries = zipFile.getEntries(); in extractZip() 94 if (!extractZipEntry(zipFile, entry, childFile)) { in extractZip() 117 try (java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile(toUnzip)) { in extractZip() argument [all …]
|
/aosp_15_r20/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/ |
H A D | AlignmentTest.java | 222 File zipFile = new File(mTemporaryFolder.getRoot(), "test.zip"); 228 try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) { 241 try (ZFile zf = new ZFile(zipFile, options)) { 248 File zipFile = new File(mTemporaryFolder.getRoot(), "test.zip"); 255 try (ZFile zf = new ZFile(zipFile, options)) { 262 assertArrayEquals(recognizable, readSegment(zipFile, 1024, recognizable.length)); 267 try (ZFile zf = new ZFile(zipFile)) { 276 File zipFile = new File(mTemporaryFolder.getRoot(), "test.zip"); 283 try (ZFile zf = new ZFile(zipFile, options)) { 290 assertArrayEquals(recognizable, readSegment(zipFile, 1024, recognizable.length)); [all …]
|
H A D | ZFileTest.java | 55 import java.util.zip.ZipFile; 187 try(ZipFile jz = new ZipFile(testZip)) { in compressedFilesReadableByJavaZip() 216 File zipFile = mTemporaryFolder.newFile("test.zip"); 218 try(ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) { 230 try (ZFile zf = new ZFile(zipFile)) { 240 try (ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile))) { 254 File zipFile = mTemporaryFolder.newFile("test.zip"); 256 try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) { 266 ZFile zf = new ZFile(zipFile); 271 try (ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile))) { [all …]
|
/aosp_15_r20/external/python/cpython2/Doc/library/ |
D | zipfile.rst | 1 :mod:`zipfile` --- Work with ZIP archives 4 .. module:: zipfile 11 **Source code:** :source:`Lib/zipfile.py` 31 The error raised for bad ZIP files (old name: ``zipfile.error``). 40 .. class:: ZipFile 44 :ref:`zipfile-objects` for constructor details. 56 methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module 96 ZipFile Objects 100 .. class:: ZipFile(file[, mode[, compression[, allowZip64]]]) 118 ``True`` zipfile will create ZIP files that use the ZIP64 extensions when [all …]
|
/aosp_15_r20/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | AbstractZipFileTest.java | 32 import java.util.zip.ZipFile; 56 ZipFile zipFile = new ZipFile(f); in testInflatingFilesRequiringZipRefill() local 57 for (Enumeration<? extends ZipEntry> e = zipFile.entries(); e.hasMoreElements(); ) { in testInflatingFilesRequiringZipRefill() 61 InputStream is = zipFile.getInputStream(zipEntry); in testInflatingFilesRequiringZipRefill() 65 zipFile.close(); in testInflatingFilesRequiringZipRefill() 124 ZipFile bad = new ZipFile(badZip); in testDuplicateEntries() 156 File zipFile = createTemporaryZipFile(); in testStoredEntrySize() local 157 writeBytes(zipFile, outBuffer); in testStoredEntrySize() 159 ZipFile zip = new ZipFile(zipFile); in testStoredEntrySize() 192 ZipFile zipFile = new ZipFile(f); in testZipFileWithLotsOfEntries() local [all …]
|
H A D | ZipEntryTest.java | 32 import java.util.zip.ZipFile; 88 ZipFile zipFile = new ZipFile(f); in test_utf8FileNames() local 90 assertNotNull(filename, zipFile.getEntry(filename)); in test_utf8FileNames() 135 ZipFile zipFile = new ZipFile(f); in testMaxLengthName() local 136 assertNotNull(zipFile.getEntry(maxLengthName)); in testMaxLengthName() 137 zipFile.close(); in testMaxLengthName() 164 ZipFile zipFile = new ZipFile(f); in testMaxLengthExtra() local 165 assertEquals(maxLengthExtra.length, zipFile.getEntry("x").getExtra().length); in testMaxLengthExtra() 166 zipFile.close(); in testMaxLengthExtra() 200 ZipFile zipFile = new ZipFile(f); in checkSetTime() local [all …]
|
/aosp_15_r20/external/python/cpython3/Doc/library/ |
D | zipfile.rst | 1 :mod:`zipfile` --- Work with ZIP archives 4 .. module:: zipfile 10 **Source code:** :source:`Lib/zipfile.py` 48 .. class:: ZipFile 52 :ref:`zipfile-objects` for constructor details. 75 methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module 138 ZipFile Objects 142 .. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True, \ 169 If *allowZip64* is ``True`` (the default) zipfile will create ZIP files that 170 use the ZIP64 extensions when the zipfile is larger than 4 GiB. If it is [all …]
|
/aosp_15_r20/build/make/tools/releasetools/ |
H A D | test_common.py | 22 import zipfile 411 expected_compress_type=zipfile.ZIP_STORED): 419 zip_file = zipfile.ZipFile(zip_file_name, "r", allowZip64=True) 463 zip_file = zipfile.ZipFile(zip_file_name, "w", allowZip64=True) 468 zipfile.ZIP_STORED) 490 zip_file = zipfile.ZipFile(zip_file_name, "w", allowZip64=True) 494 zipfile.ZIP_STORED) 495 if not isinstance(zinfo_or_arcname, zipfile.ZipInfo): 531 zip_file = zipfile.ZipFile(zip_file_name, "w", allowZip64=True) 542 zipfile.ZIP_STORED) [all …]
|
H A D | test_ota_from_target_files.py | 21 import zipfile 45 with zipfile.ZipFile(target_files, 'w', allowZip64=True) as target_files_zip: 320 with zipfile.ZipFile(output, 'w') as zfp: 332 with zipfile.ZipFile(target_file) as target_zip: 493 with zipfile.ZipFile(target_file) as verify_zip: 516 with zipfile.ZipFile(target_file) as verify_zip: 536 with zipfile.ZipFile(target_file) as verify_zip: 566 with zipfile.ZipFile(input_file, 'a', allowZip64=True) as append_zip: 573 with zipfile.ZipFile(target_file) as verify_zip: 601 with zipfile.ZipFile(input_file, 'a', allowZip64=True) as append_zip: [all …]
|
/aosp_15_r20/tools/tradefederation/core/javatests/com/android/tradefed/util/ |
D | ZipUtil2Test.java | 20 import org.apache.commons.compress.archivers.zip.ZipFile; 80 ZipFile zipFile = null; in testExtractFileFromZip() local 82 zipFile = new ZipFile(zip); in testExtractFileFromZip() 83 boolean extracted = ZipUtil2.extractFileFromZip(zipFile, "NOT_EXIST", destFile); in testExtractFileFromZip() 85 extracted = ZipUtil2.extractFileFromZip(zipFile, fileName, destFile); in testExtractFileFromZip() 89 ZipFile.closeQuietly(zipFile); in testExtractFileFromZip() 97 ZipFile zipFile = null; in testExtractFileFromZipToTemp() local 99 zipFile = new ZipFile(zip); in testExtractFileFromZipToTemp() 100 File extracted = ZipUtil2.extractFileFromZip(zipFile, fileName); in testExtractFileFromZipToTemp() 104 ZipFile.closeQuietly(zipFile); in testExtractFileFromZipToTemp() [all …]
|
/aosp_15_r20/out/soong/raw-aosp_shiba/eb/ |
D | eb21e8a5b780ed77bb96b9e52526f58765961a62 | 99 …intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/android_common/jav… 100 …intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/android_common/jav… 127 …zipfile-finalizer/art-run-test-718-zipfile-finalizer/android_common/lint-srcs.list.rsp __SBOX_SAND… 130 …to: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/an… 134 …to: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/an… 138 …to: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/an… 142 …to: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/an… 146 …to: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/an… 150 …to: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/an… 154 …file: "out/soong/.intermediates/art/test/718-zipfile-finalizer/art-run-test-718-zipfile-finalizer/… [all …]
|
/aosp_15_r20/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
H A D | ZipFileTest.java | 31 import java.util.zip.ZipFile; 42 private ZipFile zfile; 45 * java.util.zip.ZipFile#ZipFile(java.io.File, int) 51 ZipFile zip = new ZipFile(file, ZipFile.OPEN_DELETE | ZipFile.OPEN_READ); in test_ConstructorLjava_io_FileI() 57 zip = new ZipFile(file, ZipFile.OPEN_READ); in test_ConstructorLjava_io_FileI() 64 zip = new ZipFile(file, -1); in test_ConstructorLjava_io_FileI() 73 * java.util.zip.ZipFile#ZipFile(java.lang.String) 77 ZipFile zip = new ZipFile(tempFileName); in test_ConstructorLjava_lang_String() 81 zip = new ZipFile(file.getAbsolutePath()); in test_ConstructorLjava_lang_String() 89 protected ZipEntry test_finalize1(ZipFile zip) { in test_finalize1() [all …]
|
/aosp_15_r20/frameworks/base/core/jni/ |
H A D | com_android_internal_content_NativeLibraryHelper.cpp | 123 sumFiles(JNIEnv*, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntry, const char*) in sumFiles() argument 128 if (!zipFile->getEntryInfo(zipEntry, nullptr, &uncompLen, nullptr, nullptr, nullptr, nullptr, in sumFiles() 138 static install_status_t extractNativeLibFromApk(ZipFileRO* zipFile, ZipEntryRO zipEntry, in extractNativeLibFromApk() argument 197 if (!zipFile->uncompressEntry(zipEntry, fd)) { in extractNativeLibFromApk() 253 zipFile->getZipFileName()); in extractNativeLibFromApk() 268 static install_status_t copyFileIfChanged(JNIEnv* env, void* arg, ZipFileRO* zipFile, in copyFileIfChanged() argument 287 if (!zipFile->getEntryInfo(zipEntry, &method, &uncompLen, nullptr, &offset, &when, &crc, in copyFileIfChanged() 313 return extractNativeLibFromApk(zipFile, zipEntry, fileName, nativeLibPath.c_str(), in copyFileIfChanged() 325 if (!punchHolesInElf64(zipFile->getZipFileName(), offset)) { in copyFileIfChanged() 328 fileName, zipFile->getZipFileName(), offset); in copyFileIfChanged() [all …]
|
/aosp_15_r20/external/zlib/contrib/minizip/ |
H A D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen(const char *pathname, int append); 117 extern zipFile ZEXPORT zipOpen64(const void *pathname, int append); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2(const char *pathname, [all …]
|
/aosp_15_r20/prebuilts/module_sdk/art/current/sdk/common_os/include/external/zlib/contrib/minizip/ |
D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen(const char *pathname, int append); 117 extern zipFile ZEXPORT zipOpen64(const void *pathname, int append); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2(const char *pathname, [all …]
|
/aosp_15_r20/prebuilts/module_sdk/art/13/common_os/include/external/zlib/contrib/minizip/ |
D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen(const char *pathname, int append); 117 extern zipFile ZEXPORT zipOpen64(const void *pathname, int append); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2(const char *pathname, [all …]
|
/aosp_15_r20/prebuilts/vndk/v33/arm64/include/external/zlib/contrib/minizip/ |
D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); 117 extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, [all …]
|
/aosp_15_r20/prebuilts/vndk/v32/x86/include/external/zlib/contrib/minizip/ |
D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); 117 extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, [all …]
|
/aosp_15_r20/prebuilts/vndk/v30/arm64/include/external/zlib/contrib/minizip/ |
D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); 117 extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, [all …]
|
/aosp_15_r20/prebuilts/module_sdk/art/7/common_os/include/external/zlib/contrib/minizip/ |
D | zip.h | 67 typedef zipFile__ *zipFile; typedef 69 typedef voidp zipFile; 116 extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); 117 extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); 119 Create a zipfile. 127 If the zipfile cannot be opened, the return value is NULL. 128 Else, the return value is a zipFile Handle, usable with other function 132 /* Note : there is no delete function into a zipfile. 133 If you want delete file into a zipfile, you must open a zipfile, and create another 137 extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, [all …]
|