Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 606) sorted by relevance

12345678910>>...25

/PHP-7.1/ext/standard/tests/file/windows_mb_path/
H A Dbug64699.phpt31 $dir = $prefix;
32 if ($dh = opendir($dir)) {
34 $path = $dir . $file;
54 filetype()[dir ] == is_dir()[dir ] -> OK: .
55 filetype()[dir ] == is_dir()[dir ] -> OK: ..
56 filetype()[dir ] == is_dir()[dir ] -> OK: a
57 filetype()[dir ] == is_dir()[dir ] -> OK: şŞıİğĞ
58 filetype()[dir ] == is_dir()[dir ] -> OK: ソ
59 filetype()[dir ] == is_dir()[dir ] -> OK: ゾ
60 filetype()[dir ] == is_dir()[dir ] -> OK: 多国語
[all …]
H A Drecursive_it.phpt2 RecursiveDirectoryIterator with dir path long or of edge case length
16 $dir = dirname(__FILE__);
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(dirname(__FILE__))+1));
55 rmdir($dir);
56 $dir = dirname($dir);
[all …]
/PHP-7.1/tests/security/
H A Dopen_basedir_dir.phpt10 test_open_basedir_before("dir");
11 test_open_basedir_error("dir");
17 test_open_basedir_after("dir");?>
33 Warning: dir(../bad): failed to open dir: %s in %s on line %d
38 Warning: dir(../bad/bad.txt): failed to open dir: %s in %s on line %d
43 Warning: dir(..): failed to open dir: %s in %s on line %d
48 Warning: dir(../): failed to open dir: %s in %s on line %d
53 Warning: dir(/): failed to open dir: %s in %s on line %d
58 Warning: dir(../bad/.): failed to open dir: %s in %s on line %d
63 Warning: dir(%s/test/bad/bad.txt): failed to open dir: %s in %s on line %d
[all …]
/PHP-7.1/ext/standard/tests/dir/
H A Ddir_variation8.phpt12 * Prototype : object dir(string $directory[, resource $context])
14 * Source code: ext/standard/dir.c
35 var_dump( dir($file_path."/dir_var*") );
36 var_dump( dir($file_path."/*") );
39 var_dump( dir($dir_path."/sub_dir?") );
40 var_dump( dir($dir_path."/sub?dir1") );
45 *** Testing dir() : checking with wildcard characters ***
48 Warning: dir(%s/dir_var*): failed to open dir: %s in %s on line %d
51 Warning: dir(%s/*): failed to open dir: %s in %s on line %d
55 Warning: dir(%s/dir_variation81/sub_dir?): failed to open dir: %s in %s on line %d
[all …]
H A Ddir_error.phpt2 Test dir() function : error conditions
6 * Prototype : object dir(string $directory[, resource $context])
8 * Source code: ext/standard/dir.c
11 echo "*** Testing dir() : error conditions ***\n";
14 echo "\n-- Testing dir() function with zero arguments --";
15 var_dump( dir() );
20 var_dump( dir(getcwd(), "stream", $extra_arg) );
25 *** Testing dir() : error conditions ***
27 -- Testing dir() function with zero arguments --
28 Warning: dir() expects at least 1 parameter, 0 given in %s on line %d
[all …]
H A Ddir_variation7.phpt23 * Source code: ext/standard/dir.c
27 * remove the execute permission from the parent dir and test dir() on child dir
32 echo "*** Testing dir() : remove execute permission from the parent dir ***\n";
37 |-> child_dir ( child dir)
56 $d = dir($child_dir_path); // try to open, expected failure
59 // remove the execute permisson from parent dir, allowing all permission for sub dir
60 chmod($sub_dir_path, 0777); // all permisson to sub dir
63 $d = dir($child_dir_path); // try to open, expected failure
85 *** Testing dir() : remove execute permission from the parent dir ***
88 Warning: dir(%s/dir_variation7/sub_dir/child_dir): failed to open dir: %s in %s on line %d
[all …]
H A Ddir_variation2.phpt2 Test dir() function : usage variations - unexpected value for 'context' argument
6 * Prototype : object dir(string $directory[, resource $context])
8 * Source code: ext/standard/dir.c
12 * Passing non resource values to 'context' argument of dir() and see
16 echo "*** Testing dir() : unexpected values for \$context argument ***\n";
96 var_dump( dir($directory, $unexpected_value) );
110 *** Testing dir() : unexpected values for $context argument ***
129 Warning: dir() expects parameter 2 to be resource, float given in %s on line %d
133 Warning: dir() expects parameter 2 to be resource, float given in %s on line %d
169 Warning: dir() expects parameter 2 to be resource, null given in %s on line %d
[all …]
H A Ddir_variation6.phpt2 Test dir() function : usage variations - non-existent directory
12 * Prototype : object dir(string $directory[, resource $context])
14 * Source code: ext/standard/dir.c
21 echo "*** Testing dir() : open a non-existent directory ***\n";
29 $d = dir($dir_path);
30 $d->close(); //close the dir
37 var_dump( dir($dir_path) );
42 $d = dir($non_existent_dir);
48 *** Testing dir() : open a non-existent directory ***
51 Warning: dir(%s): failed to open dir: %s in %s on line %d
[all …]
H A Ddir_variation1.phpt2 Test dir() function : usage variations - unexpected value for 'dir' argument
12 * Prototype : object dir(string $directory[, resource $context])
14 * Source code: ext/standard/dir.c
18 * Passing non string values to 'directory' argument of dir() and see
22 echo "*** Testing dir() : unexpected values for \$directory argument ***\n";
38 $dfp = opendir( dirname(__FILE__) ); // get a dir handle
70 // resource variable(dir and file handle)
82 var_dump( dir($unexpected_value) );
91 *** Testing dir() : unexpected values for $directory argument ***
126 Warning: dir(1): failed to open dir: %s in %s on line %d
[all …]
H A Ddir_variation2-win32-mb.phpt2 Test dir() function : usage variations - unexpected value for 'context' argument
12 * Prototype : object dir(string $directory[, resource $context])
14 * Source code: ext/standard/dir.c
18 * Passing non resource values to 'context' argument of dir() and see
22 echo "*** Testing dir() : unexpected values for \$context argument ***\n";
102 var_dump( dir($directory, $unexpected_value) );
116 *** Testing dir() : unexpected values for $context argument ***
135 Warning: dir() expects parameter 2 to be resource, float given in %s on line %d
139 Warning: dir() expects parameter 2 to be resource, float given in %s on line %d
175 Warning: dir() expects parameter 2 to be resource, null given in %s on line %d
[all …]
H A Ddir_variation9.phpt2 Test dir() function : usage variations - relative valid and invalid paths
12 * Prototype : object dir(string $directory[, resource $context])
14 * Source code: ext/standard/dir.c
45 var_dump( dir("$dir_path1/sub_dir11/sub_dir111/..") );
46 var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91") );
52 var_dump( dir("$dir_path1/sub_dir12/sub_dir111/..") );
53 var_dump( dir("$dir_path2/sub_dir21/../dir_variation91") );
106 Warning: dir(%s/dir_variation91/sub_dir12/sub_dir111/..): failed to open dir: %s in %s on line %d
109 Warning: dir(%s/dir_variation92/sub_dir21/../dir_variation91): failed to open dir: %s in %s on line…
112 Warning: dir(%s/dir_variation92/sub_dir21/../../dir_variation91/sub_dir12/..): failed to open dir: …
[all …]
/PHP-7.1/ext/zip/tests/
H A Dbug70103.phpt9 $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 Dbug70350.phpt10 $dir = dirname(__FILE__)."/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 = dirname(__FILE__)."/bug70350";
27 rmdir("$dir/down2");
28 unlink("$dir/a.zip");
29 rmdir($dir);
/PHP-7.1/ext/standard/tests/file/
H A Dbasename_variation1.phpt38 "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 Dfilesize_variation2-win32.phpt2 Test filesize() function: usage variations - size of dir/subdir
21 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
22 echo "-- Creating a base dir, and checking its size --\n";
27 echo "-- Creating a file inside base dir, and checking dir & file size --\n";
35 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n";
37 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir
48 // size of base dir
70 *** Testing size of a dir, sub-dir and file with filesize() ***
71 -- Creating a base dir, and checking its size --
73 -- Creating a file inside base dir, and checking dir & file size --
[all …]
H A Dfilesize_variation2.phpt2 Test filesize() function: usage variations - size of dir/subdir
21 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
22 echo "-- Creating a base dir, and checking its size --\n";
27 echo "-- Creating a file inside base dir, and checking dir & file size --\n";
35 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n";
37 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir
48 // size of base dir
70 *** Testing size of a dir, sub-dir and file with filesize() ***
71 -- Creating a base dir, and checking its size --
73 -- Creating a file inside base dir, and checking dir & file size --
[all …]
H A Dcopy_variation13.phpt10 /* Test copy(): Trying to copy dir to an existing file */
16 $dir = $file_path."/copy_variation13";
17 mkdir($dir);
19 echo "*** Testing copy() in copying dir to file ***\n";
20 var_dump( copy($dir, $file) );
23 var_dump( file_exists($dir) );
25 var_dump( is_file($dir) );
26 var_dump( is_dir($dir) );
32 var_dump( filesize($dir) );
42 *** Test copy() function: Trying to copy dir to file ***
[all …]
H A Dbasename_variation2.phpt20 "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-7.1/ext/phar/tests/
H A Dbug70019.phpt7 $dir = __DIR__."/bug70019";
9 if(!is_dir($dir)) {
10 mkdir($dir);
12 $phar->extractTo($dir);
13 var_dump(file_exists("$dir/ThisIsATestFile.txt"));
18 $dir = __DIR__."/bug70019";
19 unlink("$dir/ThisIsATestFile.txt");
20 rmdir($dir);
H A Dphar_extract2.phpt41 $dir = dirname(__FILE__) . '/extract2/';
42 @unlink($dir . 'file1.txt');
43 @unlink($dir . 'file2.txt');
44 @unlink($dir . 'subdir/ectory/file.txt');
45 @rmdir($dir . 'subdir/ectory');
46 @rmdir($dir . 'subdir');
47 @rmdir($dir . 'one/level');
48 @rmdir($dir . 'one');
49 @rmdir($dir);
50 $dir = dirname(__FILE__) . '/extract1/';
[all …]
H A Dstat.phpt20 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-7.1/ext/spl/examples/
H A Dphar_from_dir.php33 $dir = new RecursiveDirectoryIterator($argv[2]); variable
34 $dir = new RecursiveIteratorIterator($dir); variable
37 $dir = new RegexIterator($dir, '/'.$argv[3].'/'); variable
42 foreach($dir as $file)
/PHP-7.1/ext/fileinfo/tests/
H A Dbug61964.phpt13 $dir = __DIR__ . "/test-folder";
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 Dbug61964-mb.phpt13 $dir = __DIR__ . "/test-folder";
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-7.1/ext/spl/tests/
H A Dbug68825.phpt5 $dir = __DIR__ . '/bug68825';
6 mkdir($dir);
7 symlink(__FILE__, "$dir/foo");
9 $di = new \DirectoryIterator($dir);
22 $dir = __DIR__ . '/bug68825';
23 unlink("$dir/foo");
24 rmdir($dir);

Completed in 32 milliseconds

12345678910>>...25