/php-src/ext/zip/tests/ |
H A D | bug72374.phpt | 7 $dirname = dirname(__FILE__) . '/'; 8 include $dirname . 'utils.inc'; 10 $dirname = $dirname . 'bug72374'; 11 mkdir($dirname); 12 $file1 = $dirname . '/some-foo.txt'; 14 $file2 = $dirname . '/some-bar.txt'; 21 $zip->addGlob($file2, 0, array('remove_path' => $dirname)); 27 $dirname = dirname(__FILE__) . '/'; 28 include $dirname . 'utils.inc'; 30 $dirname = $dirname . 'bug72374'; [all …]
|
H A D | oo_extract.phpt | 7 $dirname = __DIR__ . '/'; 8 $file = $dirname . 'test_with_comment.zip'; 9 include $dirname . 'utils.inc'; 16 $zip->extractTo($dirname . '__oo_extract_tmp'); 17 if (!is_dir($dirname . '__oo_extract_tmp')) { 21 if (!is_dir($dirname .'__oo_extract_tmp/foobar')) { 31 if (!file_exists($dirname . '__oo_extract_tmp/bar')) { 37 if (!file_exists($dirname . '__oo_extract_tmp/foo')) { 45 $zip->extractTo($dirname . '__oo_extract_tmp', 'bar'); 46 if (!file_exists($dirname . '__oo_extract_tmp/bar')) { [all …]
|
H A D | oo_addglob.phpt | 16 $dirname = __DIR__ . '/oo_addglob_dir/'; 17 $file = $dirname . 'tmp.zip'; 19 @mkdir($dirname); 21 touch($dirname . 'foo.txt'); 22 touch($dirname . 'bar.baz'); 29 if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { 63 $dirname = __DIR__ . '/oo_addglob_dir/'; 64 unlink($dirname . 'tmp.zip'); 65 unlink($dirname . 'foo.txt'); 66 unlink($dirname . 'bar.baz'); [all …]
|
H A D | oo_addglob2.phpt | 12 $dirname = __DIR__ . '/'; 13 include $dirname . 'utils.inc'; 15 $dirname = __DIR__ . '/__tmp_oo_addglob2/'; 16 $file = $dirname . 'test.zip'; 18 @mkdir($dirname); 19 copy(__FILE__, $dirname . 'foo.txt'); 20 copy(__FILE__, $dirname . 'bar.txt'); 29 if (!$zip->addGlob($dirname . 'foo.*', GLOB_BRACE, $options)) { 40 if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) { 60 $dirname = __DIR__ . '/'; [all …]
|
H A D | oo_addpattern.phpt | 13 $dirname = __DIR__ . '/oo_addpattern_dir/'; 14 $file = $dirname . 'tmp.zip'; 16 @mkdir($dirname); 18 touch($dirname . 'foo.txt'); 19 touch($dirname . 'bar.txt'); 25 $dir = realpath($dirname); 59 $dirname = __DIR__ . '/oo_addpattern_dir/'; 60 unlink($dirname . 'tmp.zip'); 61 unlink($dirname . 'foo.txt'); 62 unlink($dirname . 'bar.txt'); [all …]
|
H A D | oo_replacefile.phpt | 8 $dirname = __DIR__ . '/'; 9 include $dirname . 'utils.inc'; 10 $file = $dirname . 'oo_replacefile.zip'; 12 copy($dirname . 'test.zip', $file); 18 if ($zip->replaceFile($dirname . 'utils.inc', 5)) { 21 if (!$zip->replaceFile($dirname . 'utils.inc', 0)) { 24 if (!$zip->replaceFile($dirname . 'utils.inc', 2, 12, 42)) { 45 var_dump(strlen($zip->getFromName('bar')) == filesize($dirname . 'utils.inc'));
|
H A D | oo_addfile.phpt | 8 $dirname = __DIR__ . '/'; 9 include $dirname . 'utils.inc'; 10 $file = $dirname . 'oo_addfile.zip'; 12 copy($dirname . 'test.zip', $file); 19 if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { 23 if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { 27 if (!$zip->addFile($dirname . 'utils.inc', 'other.txt', 0, ZipArchive::LENGTH_TO_END, ZipArchive::F… 31 $del = $dirname . '__tmp_oo_addfile.txt'; 62 var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc')); 64 var_dump(strlen($zip->getFromName('other.txt')) == filesize($dirname . 'utils.inc'));
|
H A D | oo_add_encoding.phpt | 13 $dirname = __DIR__ . '/oo_add_encoding_dir/'; 14 $file = $dirname . 'tmp.zip'; 16 @mkdir($dirname); 39 $dirname = __DIR__ . '/oo_add_encoding_dir/'; 40 unlink($dirname . 'tmp.zip'); 41 rmdir($dirname);
|
/php-src/ext/spl/tests/ |
H A D | bug65069.phpt | 6 // temp dirname used here 7 $dirname = "$file_path/bug65069"; 9 mkdir($dirname); 11 ini_set('open_basedir', $dirname); 14 touch("$dirname/wonder12345"); 15 touch("$dirname/wonder.txt"); 16 touch("$dirname/file.text"); 23 $spl_glob_it = new \GlobIterator(dirname(dirname($dirname)) . "/*/*/*"); 32 var_dump(iterator_to_array(new \GlobIterator(dirname(dirname($dirname))))); 45 unlink("$dirname/file.text"); [all …]
|
H A D | DirectoryIterator_getGroup_basic.phpt | 20 $dirname = 'DirectoryIterator_getGroup_basic'; 21 mkdir($dirname); 22 $dir = new DirectoryIterator($dirname); 23 $expected = filegroup($dirname); 29 $dirname = 'DirectoryIterator_getGroup_basic'; 30 rmdir($dirname);
|
/php-src/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-src/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-src/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 | 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 | 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 | 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-src/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-src/ext/standard/ |
H A D | link.c | 93 char *dirname; in PHP_FUNCTION() local 103 dirname = estrndup(link, link_len); in PHP_FUNCTION() 104 zend_dirname(dirname, link_len); in PHP_FUNCTION() 106 if (php_check_open_basedir(dirname)) { in PHP_FUNCTION() 107 efree(dirname); in PHP_FUNCTION() 114 efree(dirname); in PHP_FUNCTION() 118 efree(dirname); in PHP_FUNCTION() 131 char dirname[MAXPATHLEN]; in PHP_FUNCTION() local 144 memcpy(dirname, source_p, sizeof(source_p)); in PHP_FUNCTION() 145 len = zend_dirname(dirname, strlen(dirname)); in PHP_FUNCTION() [all …]
|
/php-src/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
|