Home
last modified time | relevance | path

Searched refs:zip (Results 51 – 75 of 269) sorted by relevance

1234567891011

/php-src/ext/zip/tests/
H A Doo_addpattern.phpt8 zip
14 $file = $dirname . 'tmp.zip';
17 copy(__DIR__ . '/test.zip', $file);
21 $zip = new ZipArchive();
22 if (!$zip->open($file)) {
27 if (!$zip->addPattern('/\.txt$/', $dir, $options)) {
32 var_dump($zip->getStatusString());
39 if ($zip->status == ZIPARCHIVE::ER_OK) {
40 if (!verify_entries($zip, [
52 $zip->close();
[all …]
H A Doo_open.phpt2 zip::open() function
4 zip
9 $zip = new ZipArchive;
10 $r = $zip->open($dirname . 'nofile');
17 $r = $zip->open($dirname . 'nofile', ZIPARCHIVE::CREATE);
25 $zip = new ZipArchive;
27 $zip->open('');
32 if (!$zip->open($dirname . 'test.zip')) {
36 if ($zip->status == ZIPARCHIVE::ER_OK) {
H A Ddoubleclose.phpt4 zip
9 $zip = zip_open(__DIR__ . '/test.zip');
10 if (!is_resource($zip)) {
13 var_dump(zip_close($zip));
15 var_dump(zip_close($zip));
21 $zip = new ZipArchive();
22 if (!$zip->open(__DIR__ . '/test.zip')) {
25 if ($zip->status == ZIPARCHIVE::ER_OK) {
26 var_dump($zip->close());
28 $zip->close();
H A Dbug77978.phpt4 zip
7 $file = __DIR__ . "/bug77978.zip";
12 $zip = new ZipArchive();
13 $zip->open($file, ZipArchive::CREATE|ZipArchive::OVERWRITE);
14 $zip->addFromString("dir/test:/filename.txt", "contents");
15 $zip->close();
17 $zip->open($file);
19 @$zip->extractTo($target, "dir/test:/filename.txt");
20 $zip->close();
30 @unlink(__DIR__ . "/bug77978.zip");
H A Dbug51353.phpt4 zip
19 $zip = new ZipArchive;
20 $r = $zip->open("$base_path/51353.zip", ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE);
23 $zip->addFromString("$i.txt", '1');
25 $zip->close();
30 $zip = new ZipArchive;
31 $r = $zip->open("$base_path/51353.zip");
33 $zip->extractTo("$base_path/51353_unpack");
34 $zip->close();
48 unlink("$base_path/51353.zip");
H A Dbug64342_1-mb.phpt4 zip
10 $file = $dirname . '__私はガラスを食べられますtmp_oo_addfile.zip';
12 copy($dirname . 'test.zip', $file);
14 $zip = new ZipArchive;
15 if (!$zip->open($file)) {
18 if (!$zip->addFile($dirname . 'cant_find_me.txt', 'test.php')) {
21 if ($zip->status == ZIPARCHIVE::ER_OK) {
22 if (!verify_entries($zip, [
32 $zip->close();
H A Dbug64342_1.phpt4 zip
10 $file = $dirname . 'bug64342_1.zip';
12 copy($dirname . 'test.zip', $file);
14 $zip = new ZipArchive;
15 if (!$zip->open($file)) {
18 if (!$zip->addFile($dirname . 'cant_find_me.txt', 'test.php')) {
21 if ($zip->status == ZIPARCHIVE::ER_OK) {
22 if (!verify_entries($zip, [
32 $zip->close();
H A Doo_cancel.phpt4 zip
15 $file = $dirname . '__tmp_oo_cancel.zip';
19 $zip = new ZipArchive;
20 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
24 var_dump($zip->registerCancelCallback(function () {
28 var_dump($zip->addFromString(PHP_BINARY, 'entry #1'));
30 var_dump($zip->close());
31 var_dump($zip->status == ZipArchive::ER_CANCELLED);
32 var_dump($zip->getStatusString());
H A Doo_addglob2.phpt4 zip
16 $file = $dirname . 'test.zip';
22 $zip = new ZipArchive();
29 if (!$zip->addGlob($dirname . 'foo.*', GLOB_BRACE, $options)) {
40 if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) {
43 if ($zip->status == ZIPARCHIVE::ER_OK) {
44 $zip->close();
46 $zip = new ZipArchive();
47 $zip->open($file);
48 for($i=0; $i<$zip->numFiles; $i++) {
[all …]
H A Dbug7658.phpt4 zip
27 $zip = new ZipArchive();
29 if(!$zip->open($file)) {
34 $zip->deleteName('content.xml');
35 $zip->addFile($dirname . "bug7658.xml","content.xml");
36 $zip->close();
38 $zip->open($file);
40 for($i=0; $i < $zip->numFiles; $i++) {
41 $sb = $zip->statIndex($i);
47 unset($zip);
H A Dbug70752.phpt4 zip
7 $filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug70752.zip';
8 $zip = new ZipArchive();
9 $zip->open($filename);
14 $zip->setPassword('bar'); // correct password would be 'foo'
15 $zip->extractTo(__DIR__);
16 $zip->close();
H A Dbug72374.phpt4 zip
17 $zip = new ZipArchive();
18 $zip->open($dirname . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
19 $zip->addGlob($file1, 0, array('remove_path' => $dirname . '/some-'));
20 $zip->addGlob($file1, 0, array('remove_path' => $dirname . '/'));
21 $zip->addGlob($file2, 0, array('remove_path' => $dirname));
22 verify_entries($zip, ['foo.txt', 'some-foo.txt', 'some-bar.txt']);
23 $zip->close();
H A Dbug78641.phpt4 zip
12 $zip = new ZipArchive();
13 $zip->open(TMPDIR . "bug78641.zip", ZipArchive::CREATE | ZipArchive::OVERWRITE);
15 $zip->addGlob($file, 0, ["remove_path" => TMPDIR]);
17 $zip->close();
25 unlink(__DIR__ . '/bug78641.zip');
H A Dbug53579.phpt4 zip
8 $file = $dirname . 'test_with_comment.zip';
10 $zip = new ZipArchive;
11 if (!$zip->open($file)) {
14 $fp = $zip->getStream('foo');
21 $zip->close();
25 $fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb');
H A Doo_stream.phpt4 zip
8 $file = $dirname . 'test_with_comment.zip';
10 $zip = new ZipArchive;
11 if (!$zip->open($file)) {
14 $fp = $zip->getStream('foo');
24 $zip->close();
28 $fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb');
H A Dbug72660.phpt4 zip
11 $zip = new ZipArchive();
12 $zip->open(__DIR__ . "/bug72660.zip", ZIPARCHIVE::CREATE);
13 $zip->addPattern("/noexists/");
18 @unlink(__DIR__ . "/bug72660.zip");
H A Dbug_gh8781.phpt2 Bug GH-8781 (ZipArchive deletes zip file with no contents)
4 zip
7 touch($file = __DIR__ . '/bug_gh8781.zip');
10 $zip = new ZipArchive();
11 $zip->open($file, ZipArchive::CREATE | ZipArchive::OVERWRITE);
12 $zip->close();
H A Dbug72258.phpt4 zip
8 $fn = __DIR__ . DIRECTORY_SEPARATOR . "bug72258.zip";
10 $zip = new \ZipArchive();
11 $res = $zip->open($fn);
17 for ($i = 0; $i < $zip->numFiles; $i++) {
18 $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW);
H A Dcompression_methods.phpt5 libzip, but for now only 6 methods are available in compression_methods.zip.
6 The zip and the test should be extended, if possible.
8 zip
19 $zip = new ZipArchive();
20 $zip->open(__DIR__ . '/compression_methods.zip');
23 var_dump($zip->statName($filename)['comp_method'] === $method);
25 $zip->close();
/php-src/ext/phar/tests/zip/
H A Dnotphar.phpt2 Phar: a non-executable zip with no stub named .phar.zip
11 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
14 copy(__DIR__ . '/files/zip.zip', $fname);
20 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
24 …har.phar.zip/.phar/stub.php): Failed to open stream: '%snotphar.phar.zip' is not a phar archive. U…
H A Dbzip2.phpt2 Phar: process bzip2-compressed zip entry
11 $a = new PharData(dirname(__FILE__) . '/files/bzip2.zip');
27 $a->writeZip(dirname(__FILE__) . '/encrypted.zip');
31 $a->writeZip(dirname(__FILE__) . '/stdin.zip');
35 $a->writeZip(dirname(__FILE__) . '/truncfilename.zip');
38 $a->writeZip(dirname(__FILE__) . '/compress_unsup1.zip');
41 $a->writeZip(dirname(__FILE__) . '/compress_unsup2.zip');
44 $a->writeZip(dirname(__FILE__) . '/compress_unsup3.zip');
47 $a->writeZip(dirname(__FILE__) . '/compress_unsup4.zip');
50 $a->writeZip(dirname(__FILE__) . '/compress_unsup5.zip');
[all …]
H A Dalias_acrobatics.phpt10 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
11 $fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
37 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
38 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
41 …ady used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.2…
43 phar error: Unable to add zip-based phar "%salias_acrobatics.2.phar.zip" with implicit alias, alias…
44 …eady used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.…
/php-src/ext/fileinfo/tests/
H A Dfinfo_file_stream_001.phpt5 zip
12 $zip = __DIR__ . "/resources/dir.zip";
13 $stream = "zip://" . __DIR__ . "/resources/dir.zip";
18 finfo_file($fp, $zip),
24 string(15) "application/zip"
/php-src/ext/zip/
H A Dconfig.m41 PHP_ARG_WITH([zip],
2 [for zip archive read/write support],
3 [AS_HELP_STRING([--with-zip],
12 PHP_CHECK_LIBRARY([zip], [zip_file_set_mtime],
19 PHP_CHECK_LIBRARY([zip], [zip_file_set_encryption],
26 PHP_CHECK_LIBRARY([zip], [zip_libzip_version],
41 PHP_CHECK_LIBRARY([zip], [zip_register_cancel_callback_with_state],
49 PHP_CHECK_LIBRARY([zip], [zip_compression_method_supported],
57 [Define to 1 if the PHP extension 'zip' is available.])
59 PHP_NEW_EXTENSION([zip], [php_zip.c zip_stream.c], [$ext_shared])
[all …]
/php-src/ext/phar/tests/zip/files/
H A Dcorrupt2.php.inc6 $a->writeZip(dirname(__FILE__) . '/encrypted.zip');
10 $a->writeZip(dirname(__FILE__) . '/stdin.zip');
14 $a->writeZip(dirname(__FILE__) . '/truncfilename.zip');
17 $a->writeZip(dirname(__FILE__) . '/compress_unsup1.zip');
20 $a->writeZip(dirname(__FILE__) . '/compress_unsup2.zip');
23 $a->writeZip(dirname(__FILE__) . '/compress_unsup3.zip');
26 $a->writeZip(dirname(__FILE__) . '/compress_unsup4.zip');
29 $a->writeZip(dirname(__FILE__) . '/compress_unsup5.zip');
32 $a->writeZip(dirname(__FILE__) . '/compress_unsup6.zip');
35 $a->writeZip(dirname(__FILE__) . '/compress_unsup7.zip');
[all …]

Completed in 29 milliseconds

1234567891011