Home
last modified time | relevance | path

Searched refs:zip (Results 1 – 25 of 261) sorted by relevance

1234567891011

/PHP-8.1/ext/zip/tests/
H A Doo_properties.phpt4 zip
18 printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->status, empty($zip->status), isse…
19 printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->numFiles, empty($zip->numFiles)…
20 printf("zip->bogus (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->bogus, empty($zip->bogus), isset($
25 printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->status, empty($zip->status), isse…
26 printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->numFiles, empty($zip->numFiles)…
27 printf("zip->filename (%d):\n\tempty(): %d\n\tisset(): %d\n", strlen($zip->filename), empty($zip->f…
28 printf("zip->comment (%d):\n\tempty(): %d\n\tisset(): %d\n", strlen($zip->comment), empty($zip->com…
34 zip->status (0):
42 zip->bogus (0):
[all …]
H A Doo_setcomment.phpt4 zip
9 $file = $dirname . 'oo_setcomment.zip';
13 $zip = new ZipArchive;
22 var_dump($zip->setCommentIndex($zip->lastId, 'entry4.txt'));
24 var_dump($zip->setCommentIndex($zip->lastId, 'entry5.txt'));
35 echo "failed to write zip\n";
37 $zip->close();
39 if (!$zip->open($file)) {
44 var_dump($zip->getCommentIndex(0));
45 var_dump($zip->getCommentIndex(1));
[all …]
H A Doo_getnameindex.phpt4 zip
9 $file = $dirname . 'oo_getnameindex.zip';
13 $zip = new ZipArchive;
23 echo "failed to write zip\n";
25 $zip->close();
27 if (!$zip->open($file)) {
32 var_dump($zip->getNameIndex(0));
33 var_dump($zip->getNameIndex(1));
34 var_dump($zip->getNameIndex(2));
35 var_dump($zip->getNameIndex(3));
[all …]
H A Doo_unchangeName.phpt6 zip
11 copy($dirname.'test.zip', $file);
15 $zip = new ZipArchive();
16 $zip->open($file);
17 var_dump($zip->getNameIndex(0));
18 var_dump($zip->getCommentIndex(0));
23 var_dump($zip->getNameIndex(0));
24 var_dump($zip->getCommentIndex(0));
26 $zip->unchangeName('baz filename');
28 var_dump($zip->getNameIndex(0));
[all …]
H A Doo_unchangeIndex.phpt6 zip
11 copy($dirname.'test.zip', $file);
15 $zip = new ZipArchive();
16 $zip->open($file);
17 var_dump($zip->getNameIndex(0));
18 var_dump($zip->getCommentIndex(0));
23 var_dump($zip->getNameIndex(0));
24 var_dump($zip->getCommentIndex(0));
26 $zip->unchangeIndex(0);
28 var_dump($zip->getNameIndex(0));
[all …]
H A Doo_namelocate.phpt4 zip
9 $file = $dirname . 'oo_namelocate.zip';
13 $zip = new ZipArchive;
22 if (!$zip->status == ZIPARCHIVE::ER_OK) {
23 echo "failed to write zip\n";
25 $zip->close();
27 if (!$zip->open($file)) {
32 var_dump($zip->locateName('entry1.txt'));
33 var_dump($zip->locateName('eNtry2.txt'));
36 $zip->close();
[all …]
H A Dbug47667.phpt4 zip
8 $filename = $thisdir . "/bug47667.zip";
10 $zip = new ZipArchive();
12 exit("Unable to open the zip file");
15 $zip->close();
19 $zip = new ZipArchive();
24 $zip->close();
27 $zip = new ZipArchive();
29 exit("Unable to open the zip file");
32 echo "files: " , $zip->numFiles;
[all …]
H A Doo_delete.phpt4 zip
13 $zip = new ZipArchive;
22 $zip->close();
25 var_dump($zip);
33 if ($zip->deleteIndex(0)) {
52 print_r($zip);
57 $sb = $zip->statIndex(0);
59 $sb = $zip->statIndex(1);
61 $sb = $zip->statIndex(2);
64 @$zip->close();
[all …]
H A Doo_addemptydir.phpt4 zip
10 $file = $dirname . 'oo_addemptydir.zip';
12 copy($dirname . 'test.zip', $file);
14 $zip = new ZipArchive;
15 if (!$zip->open($file)) {
20 $zip->addEmptyDir('emptydir');
21 var_dump($zip->lastId); // 4
22 $zip->addEmptyDir('emptydir');
25 var_dump($zip->lastId); // 4
27 if (!verify_entries($zip, [
[all …]
H A Doo_externalattributes.phpt4 zip
8 $name = __DIR__ . '/withattr.zip';
11 $zip = new ZipArchive;
13 $zip->addFromString('foo.txt', 'foo');
14 $zip->addFromString('bar.txt', 'bar');
16 $id = $zip->locateName('bar.txt');
18 $zip->close();
21 $r = $zip->open($name);
23 $id = $zip->locateName('bar.txt');
36 $zip->close();
[all …]
H A Doo_add_encoding.phpt4 zip
14 $file = $dirname . 'tmp.zip';
17 $zip = new ZipArchive;
18 if (!$zip->open($file, ZipArchive::CREATE)) {
22 $zip->addEmptyDir('foo');
24 $zip->addEmptyDir('è', ZipArchive::FL_ENC_UTF_8);
26 $zip->addFromString('bar', __FILE__);
30 if ($zip->status == ZIPARCHIVE::ER_OK) {
31 dump_entries_name($zip);
32 $zip->close();
[all …]
H A Doo_encryption.phpt4 zip
12 $name = __DIR__ . '/encrypted.zip';
16 $zip = new ZipArchive;
19 $zip->addFromString('foo.txt', 'foo');
21 $zip->addFromString('bar.txt', 'bar');
24 $zip->close();
27 $r = $zip->open($name);
28 $s = $zip->statName('foo.txt');
30 $s = $zip->statName('bar.txt');
34 $zip->setPassword($pass);
[all …]
H A Doo_addfile.phpt4 zip
10 $file = $dirname . 'oo_addfile.zip';
12 copy($dirname . 'test.zip', $file);
14 $zip = new ZipArchive;
15 if (!$zip->open($file)) {
18 var_dump($zip->lastId);
22 var_dump($zip->lastId);
26 var_dump($zip->lastId);
28 if (!verify_entries($zip, [
40 $zip->close();
[all …]
H A Dbug70103.phpt4 zip
12 $zip = new ZipArchive();
13 $zip->open($dir . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
14 $zip->addGlob($dir . '/*.txt', GLOB_NOSORT, array('remove_all_path' => true));
15 $zip->close();
17 $zip = new ZipArchive();
18 $zip->open($dir . '/test.zip');
19 var_dump($zip->numFiles);
20 var_dump($zip->getNameIndex(0));
21 $zip->close();
[all …]
H A Doo_setmtime.phpt4 zip
20 $zip = new ZipArchive;
32 $s = $zip->statName('foo');
35 $s = $zip->statName('foo');
39 $s = $zip->statIndex(1);
42 $s = $zip->statIndex(1);
48 $zip->close();
50 if (!$zip->open($file)) {
56 $s = $zip->statIndex(0);
60 $s = $zip->statName('bar');
[all …]
H A Doo_rename.phpt4 zip
9 $file = $dirname . 'oo_rename.zip';
13 $zip = new ZipArchive;
14 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
22 if (!$zip->status == ZIPARCHIVE::ER_OK) {
23 var_dump($zip);
27 $zip->close();
29 if (!$zip->open($file)) {
33 if (!verify_entries($zip, [
51 if (!verify_entries($zip, [
[all …]
H A Doo_add_from_string.phpt4 zip
14 $file = $dirname . 'tmp.zip';
17 copy(__DIR__ . '/test.zip', $file);
19 $zip = new ZipArchive();
20 if (!$zip->open($file)) {
26 var_dump($zip->status == ZipArchive::ER_OK);
32 var_dump($zip->status == ZipArchive::ER_OK);
34 if ($zip->status == ZipArchive::ER_OK) {
35 dump_entries_name($zip);
36 $zip->close();
[all …]
H A Dstream_meta_data.phpt2 stream_get_meta_data() on zip stream
4 zip
10 $zip = new ZipArchive;
11 if (!$zip->open($file)) {
14 $fp = $zip->getStream('foo');
21 $zip->close();
24 $fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb');
42 string(3) "zip"
60 string(11) "zip wrapper"
62 string(3) "zip"
[all …]
/PHP-8.1/ext/phar/tests/zip/
H A Dcorrupt_008.phpt84 … unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip"
85 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip"
86 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip"
87 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip"
88 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip"
89 …unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip"
90 …nsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip"
91 …supported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip"
93 …r: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zi…
96 …unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zi…
[all …]
H A Dunixzip.phpt2 Phar: test a zip archive created by unix "zip" command
7 $a = new PharData(__DIR__ . '/files/zip.zip');
21 dir phar://%s/zip.zip%cempty
22 phar://%s/zip.zip%chi.txt
25 dir phar://%s/zip.zip%cnotempty
26 phar://%s/zip.zip/notempty%chi.txt
/PHP-8.1/ext/zip/examples/
H A DextractAll.php2 $zip = new ZipArchive(); variable
4 echo $zip->filename . "\n";
5 $zip->open("test.zip");
10 echo $zip->status . "\n";
11 echo $zip->statusSys . "\n";
13 echo $zip->numFiles . "\n";
14 echo $zip->filename . "\n";
15 var_dump($zip);
19 echo $zip->status . "\n";
20 echo $zip->statusSys . "\n";
[all …]
H A Dextract.php6 $zip = new ZipArchive(); variable
8 echo $zip->filename . "\n";
9 $zip->open("test.zip");
14 echo $zip->status . "\n";
15 echo $zip->statusSys . "\n";
17 echo $zip->numFiles . "\n";
18 echo $zip->filename . "\n";
19 var_dump($zip);
23 echo $zip->status . "\n";
24 echo $zip->statusSys . "\n";
[all …]
H A Dencryption.php13 $zip = new ZipArchive; variable
15 $zip->addFile(__FILE__, $file);
17 $zip->close();
21 $zip = new ZipArchive; variable
23 $zip->setPassword($pass);
24 $zip->addFile(__FILE__, $file);
26 $zip->close();
30 $zip->open($name);
31 print_r($zip->statName($file));
35 $zip->setPassword($pass);
[all …]
H A Dcreate.php8 $zip = new ZipArchive(); variable
11 if (!$zip->open($filename, ZIPARCHIVE::CREATE)) {
17 $zip->addFromString("testfilephp.txt" . time(), "#1 This is a test string added as testfilephp.txt.…
18 $zip->addFromString("testfilephp2.txt" . time(), "#2 This is a test string added as testfilephp2.tx…
19 $zip->addFile($thisdir . "/too.php","/testfromfile.php");
20 echo "numfiles: " . $zip->numFiles . "\n";
21 echo "status:" . $zip->status . "\n";
22 $zip->close();
23 unset($zip);
/PHP-8.1/ext/standard/tests/file/
H A Dbasename-win32.phpt31 array("bar.zip", ".zip"),
32 array("bar.zip", "bar.zip"),
34 array("foo\\bar.zip", ".zip"),
35 array("\\bar.zip", ".zip"),
38 array("bar.zip\\", ".zip"),
39 array("\\bar.zip\\", ".zip"),
42 array("\\bar.zip\\", ".zip"),
45 array("\\.zip", ".zip"),
46 array(".zip", ".zip"),
47 array("\\foo\\.zip", ".zip"),
[all …]

Completed in 78 milliseconds

1234567891011