Home
last modified time | relevance | path

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

12345678910>>...23

/PHP-7.4/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 = __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-7.4/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.4/ext/spl/tests/
H A Dbug77263.phpt5 $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 Dbug78863.phpt5 $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);
/PHP-7.4/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 = __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);
/PHP-7.4/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_variation7.phpt15 * Source code: ext/standard/dir.c
19 * remove the execute permission from the parent dir and test dir() on child dir
24 echo "*** Testing dir() : remove execute permission from the parent dir ***\n";
29 |-> child_dir ( child dir)
48 $d = dir($child_dir_path); // try to open, expected failure
51 // remove the execute permisson from parent dir, allowing all permission for sub dir
52 chmod($sub_dir_path, 0777); // all permisson to sub dir
55 $d = dir($child_dir_path); // try to open, expected failure
77 *** Testing dir() : remove execute permission from the parent dir ***
80 Warning: dir(%s/dir_variation7/sub_dir/child_dir): failed to open dir: %s 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_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 …]
H A Ddir_variation5.phpt2 Test dir() function : usage variations - open a file instead of directory
12 * Prototype : object dir(string $directory[, resource $context])
14 * Source code: ext/standard/dir.c
18 * Passing a file as argument to dir() function instead of a directory
22 echo "*** Testing dir() : open a file instead of a directory ***\n";
25 $d = dir(__FILE__);
31 *** Testing dir() : open a file instead of a directory ***
33 Warning: dir(%s): failed to open dir: %s in %s on line %d
H A Dscandir_variation10.phpt5 /* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
7 * Source code: ext/standard/dir.c
25 $dir = __DIR__ . '/scandir_variation10';
26 mkdir($dir);
27 @create_files($dir, 2);
30 var_dump(scandir($dir, SCANDIR_SORT_ASCENDING));
31 var_dump(scandir($dir, SCANDIR_SORT_DESCENDING));
34 $files = scandir($dir, SCANDIR_SORT_NONE);
41 delete_files($dir, 2);
46 $dir = __DIR__ . '/scandir_variation10';
[all …]
/PHP-7.4/ext/fileinfo/tests/
H A Dbug61964.phpt13 $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 Dbug61964-mb.phpt13 $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-7.4/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 = __DIR__ . '/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 = __DIR__ . '/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.4/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 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 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_variation15.phpt2 Test copy() function: usage variations - destination dir access perms
16 /* Test copy(): Trying to create a copy of file in a dir which doesn't have write permissions */
26 $dir = $file_path."/copy_variation15";
27 mkdir($dir);
29 $old_perms = fileperms($dir);
31 chmod($dir, 0555); //dir without write permissions
33 $dest = $dir."/copy_copy_variation15.tmp";
35 var_dump( copy($file, $dir."/copy_copy_variation15.tmp") );
36 var_dump( file_exists($dir."/copy_copy_variation15_dir.tmp") );
39 chmod($dir, $old_perms);
[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.4/ext/phar/tests/tar/
H A Dtar_003.phpt20 $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");
57 dir
58 dir
59 dir
64 dir
65 dir
[all …]

Completed in 48 milliseconds

12345678910>>...23