/php-src/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-src/ext/zip/tests/ |
H A D | bug70103.phpt | 7 $dir = __DIR__ . '/bug70103'; 9 mkdir($dir); chmod($dir, 0777); 10 file_put_contents($dir . '/foo.txt', 'foo'); 13 $zip->open($dir . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); 14 $zip->addGlob($dir . '/*.txt', GLOB_NOSORT, array('remove_all_path' => true)); 18 $zip->open($dir . '/test.zip'); 25 $dir = __DIR__ . '/bug70103'; 26 unlink($dir . '/foo.txt'); 27 unlink($dir . '/test.zip'); 28 rmdir($dir);
|
H A D | bug70350.phpt | 8 $dir = __DIR__."/bug70350"; 9 mkdir($dir); 11 $archive->open("$dir/a.zip",ZipArchive::CREATE); 16 $archive2->open("$dir/a.zip"); 17 $archive2->extractTo($dir); 19 var_dump(file_exists("$dir/down2/")); 24 $dir = __DIR__."/bug70350"; 25 rmdir("$dir/down2"); 26 unlink("$dir/a.zip"); 27 rmdir($dir);
|
/php-src/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 | filesystemiterator_no_skip_dots.phpt | 6 $dir = __DIR__ . '/filesystemiterator_no_skip_dots'; 7 mkdir($dir); 8 touch($dir . '/file'); 10 $it = new FileSystemIterator($dir, 0); 21 $dir = __DIR__ . '/filesystemiterator_no_skip_dots'; 22 unlink($dir . '/file'); 23 rmdir($dir);
|
H A D | RecursiveDirectoryIterator_hasChildren.phpt | 6 $dir = __DIR__ . DIRECTORY_SEPARATOR . 'symlinktest'; 8 if (!mkdir($dir)) { 10 } elseif (!symlink(__DIR__, $dir . DIRECTORY_SEPARATOR . 'symlink')) { 14 $it = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS | FilesystemIterator::FOLL… 32 $dir = __DIR__ . DIRECTORY_SEPARATOR . 'symlinktest'; 34 rmdir($dir . DIRECTORY_SEPARATOR . 'symlink'); 36 unlink($dir . DIRECTORY_SEPARATOR . 'symlink'); 38 rmdir($dir);
|
H A D | gh11338.phpt | 13 test('/dir/anotherdir/basedir//'); 14 test('/dir/anotherdir/basedir/'); 15 test('/dir/anotherdir/basedir'); 16 test('/dir/anotherdir//basedir'); 24 Testing: '/dir/anotherdir/basedir//' 27 Testing: '/dir/anotherdir/basedir/' 30 Testing: '/dir/anotherdir/basedir' 33 Testing: '/dir/anotherdir//basedir'
|
/php-src/ext/fileinfo/tests/ |
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 …]
|
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 …]
|
/php-src/ext/dom/tests/modern/css_selectors/ |
H A D | pseudo_classes_dir.phpt | 2 CSS Selectors - Pseudo classes: dir 11 <container dir="rtl"> 13 <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> 19 test_failure($dom, ':dir(rtl)', true); 20 test_failure($dom, ':dir(ltr)', true); 24 --- Selector: :dir(rtl) --- 25 Code 12 Invalid selector (Selectors. Not supported: dir) 26 --- Selector: :dir(ltr) --- 27 Code 12 Invalid selector (Selectors. Not supported: dir)
|
/php-src/ext/phar/tests/ |
H A D | bug70019.phpt | 8 $dir = __DIR__."/bug70019"; 10 if(!is_dir($dir)) { 11 mkdir($dir); 13 $phar->extractTo($dir); 14 var_dump(file_exists("$dir/ThisIsATestFile.txt")); 18 $dir = __DIR__."/bug70019"; 19 unlink("$dir/ThisIsATestFile.txt"); 20 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 | 26 var_dump(stat("dir/file1.txt")); 28 var_dump(lstat("dir/file1.txt")); 30 var_dump(fileperms("dir/file1.txt")); 32 var_dump(fileinode("dir/file1.txt")); 34 var_dump(filesize("dir/file1.txt")); 58 var_dump(is_dir("dir/file1.txt")); 60 var_dump(is_file("dir/file1.txt")); 62 var_dump(is_link("dir/file1.txt")); 68 $a['dir/file1.txt'] = 'hi'; 69 $a['dir/file2.txt'] = 'hi2'; [all …]
|
/php-src/ext/standard/tests/file/ |
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 | 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 | filesize_variation2-win32.phpt | 2 Test filesize() function: usage variations - size of dir/subdir 16 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n"; 17 echo "-- Creating a base dir, and checking its size --\n"; 22 echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 30 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; 32 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir 43 // size of base dir 65 *** Testing size of a dir, sub-dir and file with filesize() *** 66 -- Creating a base dir, and checking its size -- 68 -- 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 16 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n"; 17 echo "-- Creating a base dir, and checking its size --\n"; 22 echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 30 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; 32 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir 43 // size of base dir 65 *** Testing size of a dir, sub-dir and file with filesize() *** 66 -- Creating a base dir, and checking its size -- 68 -- 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 …]
|
/php-src/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-src/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 …]
|