Home
last modified time | relevance | path

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

12345678910>>...22

/PHP-8.2/ext/standard/tests/file/windows_mb_path/
H A Dbug64699.phpt31 $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 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-8.2/ext/zip/tests/
H A Dbug70103.phpt7 $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 Dbug70350.phpt8 $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);
H A Dbug14962.phpt8 $dir = __DIR__;
10 $fullpath = $dir . '/' . $file;
12 $za->open($dir . '/__14962.zip', ZIPARCHIVE::CREATE);
16 if (!is_file($dir . "/__14962.zip")) {
20 $za->open($dir . '/__14962.zip');
21 $za->extractTo($dir, NULL);
28 unlink($dir . '/' . '__14962.zip');
/PHP-8.2/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 Ddit_004.phpt6 @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 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);
H A Dfilesystemiterator_no_skip_dots.phpt6 $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 DRecursiveDirectoryIterator_hasChildren.phpt6 $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 Dgh11338.phpt13 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-8.2/ext/fileinfo/tests/
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 …]
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 …]
/PHP-8.2/ext/phar/tests/
H A Dbug70019.phpt8 $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 Dphar_extract2.phpt40 $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 Dstat.phpt26 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-8.2/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.phpt5 /* 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 Dcopy_variation15.phpt2 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 Dfilesize_variation2-win32.phpt2 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 Dfilesize_variation2.phpt2 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 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-8.2/tests/security/
H A Dopen_basedir_dir.phpt10 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.2/ext/standard/tests/dir/
H A Ddir_variation7.phpt2 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 Ddir_variation8.phpt2 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 …]

Completed in 31 milliseconds

12345678910>>...22