/PHP-8.0/ext/standard/tests/file/windows_mb_path/ |
H A D | bug64699.phpt | 31 $dir = $prefix; 32 if ($dh = opendir($dir)) { 34 $path = $dir . $file; 53 filetype()[dir ] == is_dir()[dir ] -> OK: . 54 filetype()[dir ] == is_dir()[dir ] -> OK: .. 55 filetype()[dir ] == is_dir()[dir ] -> OK: a 56 filetype()[dir ] == is_dir()[dir ] -> OK: şŞıİğĞ 57 filetype()[dir ] == is_dir()[dir ] -> OK: ソ 58 filetype()[dir ] == is_dir()[dir ] -> OK: ゾ 59 filetype()[dir ] == is_dir()[dir ] -> OK: 多国語 [all …]
|
H A D | recursive_it.phpt | 2 RecursiveDirectoryIterator with dir path long or of edge case length 16 $dir = __DIR__; 17 while ($need_len - strlen($dir) > 32) { 18 $dir .= DIRECTORY_SEPARATOR . str_repeat("a", 32); 20 $dir .= DIRECTORY_SEPARATOR . str_repeat("a", $need_len - strlen($dir)); 21 mkdir($dir, 0700, true); 23 $fl = $dir . DIRECTORY_SEPARATOR . "hello.txt"; 27 $start = substr($dir, 0, strpos($dir, DIRECTORY_SEPARATOR, strlen(__DIR__)+1)); 55 rmdir($dir); 56 $dir = dirname($dir); [all …]
|
/PHP-8.0/ext/zip/tests/ |
H A D | bug70103.phpt | 9 $dir = __DIR__ . '/bug70103'; 11 mkdir($dir); chmod($dir, 0777); 12 file_put_contents($dir . '/foo.txt', 'foo'); 15 $zip->open($dir . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); 16 $zip->addGlob($dir . '/*.txt', GLOB_NOSORT, array('remove_all_path' => true)); 20 $zip->open($dir . '/test.zip'); 27 $dir = __DIR__ . '/bug70103'; 28 unlink($dir . '/foo.txt'); 29 unlink($dir . '/test.zip'); 30 rmdir($dir);
|
H A D | bug70350.phpt | 10 $dir = __DIR__."/bug70350"; 11 mkdir($dir); 13 $archive->open("$dir/a.zip",ZipArchive::CREATE); 18 $archive2->open("$dir/a.zip"); 19 $archive2->extractTo($dir); 21 var_dump(file_exists("$dir/down2/")); 26 $dir = __DIR__."/bug70350"; 27 rmdir("$dir/down2"); 28 unlink("$dir/a.zip"); 29 rmdir($dir);
|
H A D | bug14962.phpt | 10 $dir = __DIR__; 12 $fullpath = $dir . '/' . $file; 14 $za->open($dir . '/__14962.zip', ZIPARCHIVE::CREATE); 18 if (!is_file($dir . "/__14962.zip")) { 22 $za->open($dir . '/__14962.zip'); 23 $za->extractTo($dir, NULL); 30 unlink($dir . '/' . '__14962.zip');
|
/PHP-8.0/ext/spl/tests/ |
H A D | bug77263.phpt | 5 $dir = __DIR__ . '/bug77263'; 6 mkdir($dir); 7 mkdir("$dir/subdir"); 8 touch("$dir/file1"); 9 touch("$dir/subdir/file2"); 19 $iterator = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS ); 33 $dir = __DIR__ . '/bug77263'; 34 unlink("$dir/file1"); 35 unlink("$dir/subdir/file2"); 36 rmdir("$dir/subdir"); [all …]
|
H A D | dit_004.phpt | 6 @mkdir($dir = __DIR__ . '/dit_004'); 7 touch($dir . '/file1'); 8 touch($dir . '/file2'); 9 touch($dir . '/file3'); 11 $a = new DirectoryIterator($dir); 24 $dir = __DIR__ . '/dit_004'; 25 unlink($dir . '/file1'); 26 unlink($dir . '/file2'); 27 unlink($dir . '/file3'); 28 rmdir($dir);
|
H A D | bug78863.phpt | 5 $dir = __DIR__ . '/bug78863'; 6 mkdir($dir); 7 touch("$dir/bad"); 8 mkdir("$dir/sub"); 9 touch("$dir/sub/good"); 26 $dir = __DIR__ . '/bug78863'; 27 unlink("$dir/sub/good"); 28 rmdir("$dir/sub"); 29 unlink("$dir/bad"); 30 rmdir($dir);
|
H A D | spl_autoload_013.phpt | 10 private $dir; 11 public function __construct($dir) { 12 $this->dir = $dir; 15 var_dump("{$this->dir}/$class.php"); 41 ["dir":"Autoloader":private]=> 46 ["dir":"Autoloader":private]=>
|
/PHP-8.0/ext/fileinfo/tests/ |
H A D | bug61964.phpt | 13 $dir = __DIR__ . "/bug61964"; 14 @mkdir($dir); 16 $magic_file_copy = $dir . "/magic.copy"; 27 $ret = @finfo_open(FILEINFO_NONE, $dir. "/non-exits-dir"); 33 @mkdir($dir . "/test-inner-folder"); 35 finfo_open(FILEINFO_NONE, $dir); 38 rmdir($dir . "/test-inner-folder"); 39 unlink($dir . "/test1.txt"); 40 unlink($dir . "/test2.txt"); 44 rmdir($dir); [all …]
|
H A D | bug61964-mb.phpt | 13 $dir = __DIR__ . "/bug61964-mb"; 14 @mkdir($dir); 21 $ret = finfo_open(FILEINFO_NONE, $dir); 24 $ret = @finfo_open(FILEINFO_NONE, $dir); 27 $ret = @finfo_open(FILEINFO_NONE, $dir. "/non-exits-dir私はガラスを食べられます"); 35 finfo_open(FILEINFO_NONE, $dir); 36 echo "DONE: testing dir with files\n"; 39 unlink($dir . "/test1.txt"); 40 unlink($dir . "/test2.txt"); 44 rmdir($dir); [all …]
|
/PHP-8.0/ext/phar/tests/ |
H A D | bug70019.phpt | 7 $dir = __DIR__."/bug70019"; 9 if(!is_dir($dir)) { 10 mkdir($dir); 12 $phar->extractTo($dir); 13 var_dump(file_exists("$dir/ThisIsATestFile.txt")); 17 $dir = __DIR__."/bug70019"; 18 unlink("$dir/ThisIsATestFile.txt"); 19 rmdir($dir);
|
H A D | phar_extract2.phpt | 40 $dir = __DIR__ . '/extract2/'; 41 @unlink($dir . 'file1.txt'); 42 @unlink($dir . 'file2.txt'); 43 @unlink($dir . 'subdir/ectory/file.txt'); 44 @rmdir($dir . 'subdir/ectory'); 45 @rmdir($dir . 'subdir'); 46 @rmdir($dir . 'one/level'); 47 @rmdir($dir . 'one'); 48 @rmdir($dir); 49 $dir = __DIR__ . '/extract1/'; [all …]
|
H A D | stat.phpt | 20 var_dump(stat("dir/file1.txt")); 22 var_dump(lstat("dir/file1.txt")); 24 var_dump(fileperms("dir/file1.txt")); 26 var_dump(fileinode("dir/file1.txt")); 28 var_dump(filesize("dir/file1.txt")); 52 var_dump(is_dir("dir/file1.txt")); 54 var_dump(is_file("dir/file1.txt")); 56 var_dump(is_link("dir/file1.txt")); 62 $a['dir/file1.txt'] = 'hi'; 63 $a['dir/file2.txt'] = 'hi2'; [all …]
|
/PHP-8.0/ext/standard/tests/file/ |
H A D | copy_variation13.phpt | 5 /* Test copy(): Trying to copy dir to an existing file */ 11 $dir = $file_path."/copy_variation13"; 12 mkdir($dir); 14 echo "*** Testing copy() in copying dir to file ***\n"; 15 var_dump( copy($dir, $file) ); 18 var_dump( file_exists($dir) ); 20 var_dump( is_file($dir) ); 21 var_dump( is_dir($dir) ); 27 var_dump( filesize($dir) ); 37 *** Test copy() function: Trying to copy dir to file *** [all …]
|
H A D | copy_variation15.phpt | 2 Test copy() function: usage variations - destination dir access perms 11 /* Test copy(): Trying to create a copy of file in a dir which doesn't have write permissions */ 21 $dir = $file_path."/copy_variation15"; 22 mkdir($dir); 24 $old_perms = fileperms($dir); 26 chmod($dir, 0555); //dir without write permissions 28 $dest = $dir."/copy_copy_variation15.tmp"; 30 var_dump( copy($file, $dir."/copy_copy_variation15.tmp") ); 31 var_dump( file_exists($dir."/copy_copy_variation15_dir.tmp") ); 34 chmod($dir, $old_perms); [all …]
|
H A D | basename_variation1.phpt | 38 "dir/foo.bar", 39 "dir\\foo.bar", 40 "dir with spaces/foo.bar", 41 "dir with spaces\\foo.bar", 72 string(11) "dir\foo.bar" 92 string(11) "dir\foo.bar" 112 string(14) "A:\dir\foo.bar" 132 string(11) "dir\foo.bar" 152 string(11) "dir\foo.bar" 212 string(11) "dir\foo.bar" [all …]
|
H A D | filesize_variation2-win32.phpt | 2 Test filesize() function: usage variations - size of dir/subdir 15 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n"; 16 echo "-- Creating a base dir, and checking its size --\n"; 21 echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 29 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; 31 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir 42 // size of base dir 64 *** Testing size of a dir, sub-dir and file with filesize() *** 65 -- Creating a base dir, and checking its size -- 67 -- Creating a file inside base dir, and checking dir & file size -- [all …]
|
H A D | filesize_variation2.phpt | 2 Test filesize() function: usage variations - size of dir/subdir 15 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n"; 16 echo "-- Creating a base dir, and checking its size --\n"; 21 echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 29 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; 31 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir 42 // size of base dir 64 *** Testing size of a dir, sub-dir and file with filesize() *** 65 -- Creating a base dir, and checking its size -- 67 -- Creating a file inside base dir, and checking dir & file size -- [all …]
|
H A D | basename_variation2.phpt | 20 "dir/foo.bar", 21 "dir\\foo.bar", 22 "dir with spaces/foo.bar", 193 string(7) "dir\foo" 195 string(11) "dir\foo.bar" 197 string(11) "dir\foo.bar" 199 string(11) "dir\foo.bar" 201 string(11) "dir\foo.bar" 203 string(4) "dir\" 205 string(11) "dir\foo.bar" [all …]
|
H A D | bug68335.phpt | 5 $dir = 'file://' . __DIR__ . '/testDir'; 6 mkdir($dir); 7 var_dump(is_dir($dir)); 8 rmdir($dir); 9 var_dump(is_dir($dir));
|
/PHP-8.0/tests/security/ |
H A D | open_basedir_dir.phpt | 10 test_open_basedir_before("dir"); 11 test_open_basedir_error("dir"); 13 var_dump(dir($initdir."/test/ok/")); 14 var_dump(dir($initdir."/test/ok")); 15 var_dump(dir($initdir."/test/ok/../ok")); 17 test_open_basedir_after("dir");?> 24 *** Testing open_basedir configuration [dir] *** 43 Warning: dir(..): Failed to open directory: %s in %s on line %d 48 Warning: dir(../): Failed to open directory: %s in %s on line %d 53 Warning: dir(/): Failed to open directory: %s in %s on line %d [all …]
|
/PHP-8.0/ext/standard/tests/dir/ |
H A D | dir_variation7.phpt | 2 Test dir() function : usage variations - directories with restricted permissions 13 * remove the execute permission from the parent dir and test dir() on child dir 14 * 1) remove write & execute permission from the 1st parent and test dir() 15 * 2) remove execute permission from 2nd parent and test dir() 18 echo "*** Testing dir() : remove execute permission from the parent dir ***\n"; 23 |-> child_dir ( child dir) 42 $d = dir($child_dir_path); // try to open, expected failure 45 // remove the execute permission from parent dir, allowing all permission for sub dir 46 chmod($sub_dir_path, 0777); // all permission to sub dir 49 $d = dir($child_dir_path); // try to open, expected failure [all …]
|
H A D | dir_variation8.phpt | 2 Test dir() function : usage variations - checking with wildcard characters 12 * Create more than one temporary directory & subdirectory and check if dir() function can open 16 echo "*** Testing dir() : checking with wildcard characters ***\n"; 29 var_dump( dir($file_path."/dir_var*") ); 30 var_dump( dir($file_path."/*") ); 33 var_dump( dir($dir_path."/sub_dir?") ); 34 var_dump( dir($dir_path."/sub?dir1") ); 39 *** Testing dir() : checking with wildcard characters *** 42 Warning: dir(%s/dir_var*): Failed to open directory: %s in %s on line %d 45 Warning: dir(%s/*): Failed to open directory: %s in %s on line %d [all …]
|
/PHP-8.0/ext/phar/tests/tar/ |
H A D | tar_003.phpt | 20 $tar->mkDir('internal/dir'); 21 $tar->mkDir('dir'); 35 echo (is_file($alias . '/' . $v) ? "file\n" : "dir\n"); 40 /* ensure none of the dir tar files were freed */ 44 echo (is_file($alias . '/' . $v) ? "file\n" : "dir\n"); 56 dir 57 dir 58 dir 63 dir 64 dir [all …]
|