/PHP-8.0/ext/zip/tests/ |
H A D | bug72374.phpt | 9 $dirname = dirname(__FILE__) . '/'; 10 include $dirname . 'utils.inc'; 12 $dirname = $dirname . 'bug72374'; 13 mkdir($dirname); 14 $file1 = $dirname . '/some-foo.txt'; 16 $file2 = $dirname . '/some-bar.txt'; 23 $zip->addGlob($file2, 0, array('remove_path' => $dirname)); 29 $dirname = dirname(__FILE__) . '/'; 30 include $dirname . 'utils.inc'; 32 $dirname = $dirname . 'bug72374'; [all …]
|
H A D | oo_extract.phpt | 9 $dirname = __DIR__ . '/'; 10 $file = $dirname . 'test_with_comment.zip'; 11 include $dirname . 'utils.inc'; 18 $zip->extractTo($dirname . '__oo_extract_tmp'); 19 if (!is_dir($dirname . '__oo_extract_tmp')) { 23 if (!is_dir($dirname .'__oo_extract_tmp/foobar')) { 33 if (!file_exists($dirname . '__oo_extract_tmp/bar')) { 39 if (!file_exists($dirname . '__oo_extract_tmp/foo')) { 47 $zip->extractTo($dirname . '__oo_extract_tmp', 'bar'); 48 if (!file_exists($dirname . '__oo_extract_tmp/bar')) { [all …]
|
H A D | oo_addglob.phpt | 15 $dirname = __DIR__ . '/oo_addglob_dir/'; 16 $file = $dirname . 'tmp.zip'; 18 @mkdir($dirname); 20 touch($dirname . 'foo.txt'); 21 touch($dirname . 'bar.baz'); 28 if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { 62 $dirname = __DIR__ . '/oo_addglob_dir/'; 63 unlink($dirname . 'tmp.zip'); 64 unlink($dirname . 'foo.txt'); 65 unlink($dirname . 'bar.baz'); [all …]
|
H A D | oo_addglob2.phpt | 11 $dirname = __DIR__ . '/'; 12 include $dirname . 'utils.inc'; 14 $dirname = __DIR__ . '/__tmp_oo_addglob2/'; 15 $file = $dirname . 'test.zip'; 17 @mkdir($dirname); 18 copy(__FILE__, $dirname . 'foo.txt'); 19 copy(__FILE__, $dirname . 'bar.txt'); 28 if (!$zip->addGlob($dirname . 'foo.*', GLOB_BRACE, $options)) { 39 if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) { 59 $dirname = __DIR__ . '/'; [all …]
|
H A D | oo_addpattern.phpt | 15 $dirname = __DIR__ . '/oo_addpattern_dir/'; 16 $file = $dirname . 'tmp.zip'; 18 @mkdir($dirname); 20 touch($dirname . 'foo.txt'); 21 touch($dirname . 'bar.txt'); 27 $dir = realpath($dirname); 61 $dirname = __DIR__ . '/oo_addpattern_dir/'; 62 unlink($dirname . 'tmp.zip'); 63 unlink($dirname . 'foo.txt'); 64 unlink($dirname . 'bar.txt'); [all …]
|
H A D | oo_replacefile.phpt | 10 $dirname = __DIR__ . '/'; 11 include $dirname . 'utils.inc'; 12 $file = $dirname . 'oo_replacefile.zip'; 14 copy($dirname . 'test.zip', $file); 20 if ($zip->replaceFile($dirname . 'utils.inc', 5)) { 23 if (!$zip->replaceFile($dirname . 'utils.inc', 0)) { 26 if (!$zip->replaceFile($dirname . 'utils.inc', 2, 12, 42)) { 47 var_dump(strlen($zip->getFromName('bar')) == filesize($dirname . 'utils.inc'));
|
H A D | oo_add_encoding.phpt | 12 $dirname = __DIR__ . '/oo_add_encoding_dir/'; 13 $file = $dirname . 'tmp.zip'; 15 @mkdir($dirname); 38 $dirname = __DIR__ . '/oo_add_encoding_dir/'; 39 unlink($dirname . 'tmp.zip'); 40 rmdir($dirname);
|
H A D | oo_addfile.phpt | 10 $dirname = __DIR__ . '/'; 11 include $dirname . 'utils.inc'; 12 $file = $dirname . 'oo_addfile.zip'; 14 copy($dirname . 'test.zip', $file); 21 if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { 25 if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { 49 var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc'));
|
/PHP-8.0/tests/run-test/ |
H A D | test007.phpt | 2 dirname test 7 $s = dirname("/foo"); 13 $path2 = dirname($path1); 49 dirname(%foo%) == % 50 dirname(%foo) == % 51 dirname(%foo%bar) == %foo 52 dirname(%) == % 53 dirname(...%foo) == ... 54 dirname(.%foo) == . 55 dirname(foobar%%%) == . [all …]
|
/PHP-8.0/ext/phar/tests/zip/files/ |
H A D | corrupt2.php.inc | 2 include dirname(__FILE__) . '/corrupt_zipmaker.php.inc'; 6 $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'); [all …]
|
H A D | corrupt_count1.php.inc | 2 include dirname(__FILE__) . '/corrupt_zipmaker.php.inc'; 6 $a->writeZip(dirname(__FILE__) . '/count1.zip', 'count1'); 7 $a->writeZip(dirname(__FILE__) . '/count2.zip', 'count2'); 8 $a->writeZip(dirname(__FILE__) . '/nozipend.zip', 'none'); 9 $a->writeZip(dirname(__FILE__) . '/filecomment.zip', 'comment'); 10 $a->writeZip(dirname(__FILE__) . '/cdir_offset.zip', 'cdir_offset');
|
/PHP-8.0/ext/standard/tests/file/ |
H A D | glob_basic.phpt | 9 // temp dirname used here 10 $dirname = "$file_path/glob_basic"; 13 mkdir($dirname); 16 $fp = fopen("$dirname/wonder12345", "w"); 18 $fp = fopen("$dirname/wonder.txt", "w"); 20 $fp = fopen("$dirname/file.text", "w"); 24 sort_var_dump( glob($dirname."/*") ); 25 sort_var_dump( glob($dirname."/*.txt") ); 26 sort_var_dump( glob($dirname."/*.t?t") ); 28 sort_var_dump( glob($dirname."/*.?") ); [all …]
|
H A D | chmod_variation1.phpt | 14 $dirname = __DIR__ . "/" . basename(__FILE__, ".php") . "testdir"; 15 mkdir($dirname); 18 chmod($dirname, $perms_to_set); 19 $set_perms = (fileperms($dirname) & PERMISSIONS_MASK); 26 var_dump(chmod($dirname, 0777)); 27 rmdir($dirname);
|
H A D | symlink_link_linkinfo_is_link_basic2.phpt | 16 /* Creating soft/hard link to the temporary dir $dirname and checking 17 linkinfo() and is_link() on the link created to $dirname */ 19 $dirname = "symlink_link_linkinfo_is_link_basic2"; 20 mkdir($file_path."/".$dirname); 24 // name of the soft link created to $dirname 27 // name of the hard link created to $dirname 28 $linkname = "$file_path/$dirname/symlink_link_linkinfo_is_link_hardlink_basic2.tmp"; 32 // creating soft link to $dirname 44 // creating hard link to $dirname; expected: false 62 $dirname = __DIR__."/symlink_link_linkinfo_is_link_basic2"; [all …]
|
H A D | bug69628.phpt | 14 // temp dirname used here 15 $dirname = "$file_path/bug69628"; 18 mkdir($dirname); 21 file_put_contents("$dirname/image.jPg", ''); 22 file_put_contents("$dirname/image.gIf", ''); 23 file_put_contents("$dirname/image.png", ''); 25 sort_var_dump(glob("$dirname/*.{[jJ][pP][gG],[gG][iI][fF]}", GLOB_BRACE));
|
H A D | bug43137.phpt | 6 $dirname = "FROM_" . md5(microtime()); 8 mkdir($dirname); 9 var_dump(is_dir($dirname)); // Expected: true 10 rename($dirname, $toname); 11 var_dump(is_dir($dirname)); // Expected: false
|
H A D | pathinfo_basic1-win32.phpt | 89 ["dirname"]=> 102 ["dirname"]=> 115 ["dirname"]=> 128 ["dirname"]=> 141 ["dirname"]=> 154 ["dirname"]=> 167 ["dirname"]=> 180 ["dirname"]=> 193 ["dirname"]=> 206 ["dirname"]=> [all …]
|
H A D | symlink_link_linkinfo_is_link_variation8.phpt | 20 $dirname = "$file_path/symlink_link_linkinfo_is_link1_variation8"; 21 mkdir($dirname); 27 var_dump( link($filename, $dirname."/") ); // this fails indicating file exists 29 var_dump( link($filename, $dirname."/".$linkname) ); // this works fine 31 unlink($dirname."/".$linkname); 35 rmdir($dirname); 40 $dirname = "$file_path/symlink_link_linkinfo_is_link1_variation8"; 41 mkdir($dirname); 49 var_dump( symlink($filename, $dirname."/".$linkname) ); // this works fine 51 unlink($dirname."/".$linkname); [all …]
|
H A D | pathinfo_basic1.phpt | 89 ["dirname"]=> 102 ["dirname"]=> 115 ["dirname"]=> 128 ["dirname"]=> 141 ["dirname"]=> 154 ["dirname"]=> 167 ["dirname"]=> 180 ["dirname"]=> 193 ["dirname"]=> 206 ["dirname"]=> [all …]
|
H A D | symlink_link_linkinfo_is_link_variation6.phpt | 14 $dirname = "$file_path/symlink_link_linkinfo_is_link_variation6"; 15 mkdir($dirname); 16 $filename = "$dirname/symlink_link_linkinfo_is_link_variation6.tmp"; 19 var_dump( chmod($dirname, 0000) ); 22 $linkname = "$dirname/non_existent_link_variation5.tmp"; 39 chmod($dirname, 0777); // to enable dir deletion 45 $dirname = "$file_path/symlink_link_linkinfo_is_link_variation6"; 46 $filename = "$dirname/symlink_link_linkinfo_is_link_variation6.tmp"; 50 if(file_exists($dirname)) { 51 rmdir($dirname);
|
/PHP-8.0/ext/phar/tests/zip/ |
H A D | bzip2.phpt | 11 $a = new PharData(dirname(__FILE__) . '/files/bzip2.zip'); 23 include dirname(__FILE__) . '/corrupt_zipmaker.php.inc'; 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 …]
|
/PHP-8.0/ext/standard/ |
H A D | link.c | 95 char *dirname; in PHP_FUNCTION() local 104 dirname = estrndup(link, link_len); in PHP_FUNCTION() 105 php_dirname(dirname, link_len); in PHP_FUNCTION() 107 if (php_check_open_basedir(dirname)) { in PHP_FUNCTION() 108 efree(dirname); in PHP_FUNCTION() 115 efree(dirname); in PHP_FUNCTION() 119 efree(dirname); in PHP_FUNCTION() 132 char dirname[MAXPATHLEN]; in PHP_FUNCTION() local 145 memcpy(dirname, source_p, sizeof(source_p)); in PHP_FUNCTION() 146 len = php_dirname(dirname, strlen(dirname)); in PHP_FUNCTION() [all …]
|
/PHP-8.0/ext/standard/tests/strings/ |
H A D | dirname_multi_win.phpt | 2 Test dirname() function : usage variations 12 var_dump(dirname("/foo/bar/baz", $i)); 18 var_dump(dirname("/foo/bar/baz", PHP_INT_MAX)); 19 var_dump(dirname("g:/foo/bar/baz", PHP_INT_MAX)); 20 var_dump(dirname("g:foo/bar/baz", PHP_INT_MAX)); 23 dirname(): Argument #2 ($levels) must be greater than or equal to 1
|
/PHP-8.0/ext/spl/tests/ |
H A D | DirectoryIterator_getGroup_basic.phpt | 17 $dirname = 'DirectoryIterator_getGroup_basic'; 18 mkdir($dirname); 19 $dir = new DirectoryIterator($dirname); 20 $expected = filegroup($dirname); 26 $dirname = 'DirectoryIterator_getGroup_basic'; 27 rmdir($dirname);
|
H A D | DirectoryIterator_getOwner_basic.phpt | 17 $dirname = 'DirectoryIterator_getOwner_basic'; 18 mkdir($dirname); 19 $dir = new DirectoryIterator($dirname); 20 $expected = fileowner($dirname); 26 $dirname = 'DirectoryIterator_getOwner_basic'; 27 rmdir($dirname);
|