/PHP-5.5/ext/standard/tests/file/ |
H A D | fgetcsv_variation15.phpt | 43 echo "Error: failed to create file $filename!\n"; 56 // else rewind the file pointer to beginning of the file 61 // rewind the file pointer to bof 70 // check the file pointer position and if eof 74 // close the file 76 //delete file 86 -- Testing fgetcsv() with file opened using r mode -- 96 -- Testing fgetcsv() with file opened using rb mode -- 106 -- Testing fgetcsv() with file opened using rt mode -- 116 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fwrite_variation1-win32.phpt | 23 include ("file.inc"); 62 // move the file pointer to end of the file and try fwrite() 85 -- Opening file in r -- 97 -- Opening file in rb -- 109 -- Opening file in rt -- 123 -- Opening file in r -- 135 -- Opening file in rb -- 147 -- Opening file in rt -- 161 -- Opening file in r -- 173 -- Opening file in rb -- [all …]
|
H A D | fwrite_variation1.phpt | 23 include ("file.inc"); 61 // move the file pointer to end of the file and try fwrite() 83 -- Opening file in r -- 95 -- Opening file in rb -- 107 -- Opening file in rt -- 121 -- Opening file in r -- 133 -- Opening file in rb -- 145 -- Opening file in rt -- 159 -- Opening file in r -- 171 -- Opening file in rb -- [all …]
|
H A D | file_variation4.phpt | 2 Test file() function : third parameter variation 5 /* Prototype : array file(string filename [, int flags[, resource context]]) 6 * Description: Read entire file into an array 7 * Source code: ext/standard/file.c 11 echo "*** Testing file() : usage variation ***\n"; 55 // create a file stream resource 111 // file stream resource 112 'file stream resource' => $file_stream_resource, 119 var_dump( file($filename, $flags, $value) ); 129 *** Testing file() : usage variation *** [all …]
|
H A D | fgetss_variation5-win32.phpt | 55 // rewind the file pointer to beginning of the file 74 // close the file 77 // delete the file 91 -- Reading when file pointer points to EOF -- 106 -- Reading when file pointer points to EOF -- 121 -- Reading when file pointer points to EOF -- 136 -- Reading when file pointer points to EOF -- 151 -- Reading when file pointer points to EOF -- 166 -- Reading when file pointer points to EOF -- 181 -- Reading when file pointer points to EOF -- [all …]
|
H A D | fgetss_variation5.phpt | 52 // rewind the file pointer to beginning of the file 71 // close the file 74 // delete the file 88 -- Reading when file pointer points to EOF -- 103 -- Reading when file pointer points to EOF -- 118 -- Reading when file pointer points to EOF -- 133 -- Reading when file pointer points to EOF -- 148 -- Reading when file pointer points to EOF -- 163 -- Reading when file pointer points to EOF -- 178 -- Reading when file pointer points to EOF -- [all …]
|
H A D | filesize_variation4-win32.phpt | 2 Test filesize() function: usage variations - file mode & holes in file 17 require($file_path."/file.inc"); 20 …** Testing filesize() with data written using different file modes and by creating holes in file *… 40 echo "-- opening the file in 'a' mode, adding data and checking the file --\n"; 47 echo "-- opening the file in 'at' mode, adding data and checking the file --\n"; 73 echo "-- with empty file --\n"; 89 *** Testing filesize() with data written using different file modes and by creating holes in file *… 96 -- opening the file in 'a' mode, adding data and checking the file -- 98 -- opening the file in 'at' mode, adding data and checking the file -- 105 -- opening the existing file in write mode -- [all …]
|
H A D | fgetcsv_variation10.phpt | 2 Test fgetcsv() : usage variations - file pointer pointing to EOF 10 /* Testing fgetcsv() by reading from a file when the file pointer is pointing to end of file */ 47 echo "Error: failed to create file $filename!\n"; 61 // else rewind the file pointer to beginning of the file 68 // set the file pointer to EOF 73 // now file pointer should point to end of the file, try reading again 76 // check the file pointer position and if eof 80 // check the file pointer position and if eof 84 // close the file 86 //delete file [all …]
|
H A D | 007_variation13-win32.phpt | 14 Description: Opens file or URL. 19 Description: Closes an open file pointer 22 /* Test fopen() and fclose(): Opening the file in "at" mode, 23 checking for the file creation, write & read operations, 24 checking for the file pointer position, 28 require($file_path."/file.inc"); 31 $file = $file_path."/007_variation13.tmp"; 35 $file_handle = fopen($file, "at"); //opening the file "at" mode 46 unlink($file); //Deleting the file 47 fclose( fopen($file, "at") ); //Opening the non-existing file in "at" mode, which will be created [all …]
|
H A D | 007_variation13.phpt | 14 Description: Opens file or URL. 19 Description: Closes an open file pointer 22 /* Test fopen() and fclose(): Opening the file in "at" mode, 23 checking for the file creation, write & read operations, 24 checking for the file pointer position, 28 require($file_path."/file.inc"); 31 $file = $file_path."/007_variation13.tmp"; 35 $file_handle = fopen($file, "at"); //opening the file "at" mode 46 unlink($file); //Deleting the file 47 fclose( fopen($file, "at") ); //Opening the non-existing file in "at" mode, which will be created [all …]
|
H A D | 007_variation8.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "x+" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 20 checking for the warning msg when trying to open an existing file in "x+" mode, 25 $file = $file_path."/007_variation8.tmp"; 28 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea… 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | fgetcsv_variation21.phpt | 34 echo "Error: failed to create file $filename!\n"; 41 // else rewind the file pointer to beginning of the file 46 // rewind the file pointer to bof 57 // check the file pointer position and if eof 61 // close the file 63 //delete file 72 -- Testing fgetcsv() with file opened using r mode -- 80 -- Testing fgetcsv() with file opened using rb mode -- 88 -- Testing fgetcsv() with file opened using rt mode -- 96 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | filesize_variation4.phpt | 2 Test filesize() function: usage variations - file mode & holes in file 16 /* Testing filesize() with data written using different file modes and by creating holes in file */ 21 …** Testing filesize() with data written using different file modes and by creating holes in file *… 42 echo "-- opening the file in 'a' mode, adding data and checking the file --\n"; 49 echo "-- opening the file in 'at' mode, adding data and checking the file --\n"; 75 echo "-- with empty file --\n"; 91 *** Testing filesize() with data written using different file modes and by creating holes in file *… 98 -- opening the file in 'a' mode, adding data and checking the file -- 100 -- opening the file in 'at' mode, adding data and checking the file -- 107 -- opening the existing file in write mode -- [all …]
|
H A D | fgetss_variation1-win32.phpt | 22 // include the common file related test functions 23 include ("file.inc"); 55 echo "Error: failed to open file $filename!\n"; 59 // rewind the file pointer to beginning of the file 65 /* read entire file and strip tags */ 71 // close the file 74 // delete the file 83 -- Testing fgetss() with file opened using w mode -- 93 -- Testing fgetss() with file opened using wb mode -- 113 -- Testing fgetss() with file opened using a mode -- [all …]
|
H A D | fgetss_variation1.phpt | 22 // include the common file related test functions 23 include ("file.inc"); 51 echo "Error: failed to open file $filename!\n"; 55 // rewind the file pointer to beginning of the file 61 /* read entire file and strip tags */ 67 // close the file 70 // delete the file 79 -- Testing fgetss() with file opened using w mode -- 89 -- Testing fgetss() with file opened using wb mode -- 109 -- Testing fgetss() with file opened using a mode -- [all …]
|
H A D | fnmatch_basic.phpt | 15 echo "*** Testing fnmatch() with file ***\n"; 16 $file = basename(__FILE__); 18 var_dump( fnmatch("*.php", $file) ); 19 var_dump( fnmatch("*.p*p", $file) ); 20 var_dump( fnmatch("*.p*", $file) ); 21 var_dump( fnmatch("*", $file) ); 22 var_dump( fnmatch("**", $file) ); 23 var_dump( fnmatch("*.phpt", $file) ); 25 echo "*** Testing fnmatch() with other than file ***\n"; 35 *** Testing fnmatch() with file *** [all …]
|
H A D | bug45985.phpt | 2 Bug #35740 (touch() opened file raises a warning) 5 $file = __DIR__ . '/' . '__tmp_35740.dat'; 6 file_put_contents($file, 'test'); 7 $f = fopen($file, 'r'); 8 touch($file); 10 @unlink($file);
|
H A D | unlink_variation1-win32.phpt | 2 Test unlink() function : usage variations - unlinking file in a directory 27 echo "\n*** Testing unlink() on file inside a directory ***\n"; 30 // create temp file inside $dirname 40 var_dump( file_exists($filename) ); // confirm file is deleted 50 // create the temp file 54 // remove write permission from file 57 // now try deleting temp file inside $dirname 60 // reassign write permission to temp file 62 // delete temp file 64 var_dump( file_exists($filename) ); // confirm file is deleted [all …]
|
H A D | fgetc_variation1.phpt | 2 Test fgetc() function : usage variations - read when file pointer at EOF 7 Description: Gets character from file pointer 10 include ("file.inc"); 13 echo "-- Testing fgetc() with file whose file pointer is pointing to EOF --\n"; 14 // create a file 19 // loop to check the file opened in different read modes 25 // open the file 28 echo "Error: failed to open file $filename! \n"; 32 // seek to end of the file and try fgetc() 40 // close the file handle [all …]
|
H A D | 007_variation15.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "xt" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 20 checking for the warning msg when trying to open an existing file in "xt" mode, 25 $file = $file_path."/007_variation15.tmp"; 28 $file_handle = fopen($file, "xt"); //opening the non-existing file in "xt" mode, file will be crea… 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation23.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "xb" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 20 checking for the warning msg when trying to open an existing file in "xb" mode, 25 $file = $file_path."/007_variation23.tmp"; 28 $file_handle = fopen($file, "xb"); //opening the non-existing file in "xb" mode, file will be crea… 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation7.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "x" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 20 checking for the warning msg when trying to open an existing file in "x" mode, 25 $file = $file_path."/007_variation7.tmp"; 28 $file_handle = fopen($file, "x"); //opening the non-existing file in "x" mode, file will be created 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | file_variation5.phpt | 2 file() with various paths 23 echo "file() on a path containing .. and .\n"; 24 var_dump(file("./$test_dirname/../$filename")); 27 var_dump(file("./$test_dirname/bad_dir/../../$filename")); 29 echo "\nfile() on a linked file\n"; 32 var_dump(file($linkname)); 37 var_dump(file("../$filename")); 46 file() on a path containing .. and . 58 file() on a path containing .. with invalid directories 70 file() on a linked file [all …]
|
H A D | lstat_stat_variation4.phpt | 2 Test lstat() and stat() functions: usage variations - effects of touch() on file 13 Description: Gives information about a file or symbolic link 16 Description: Gives information about a file 19 /* test the effects of touch() on stats of file */ 22 require "$file_path/file.inc"; 25 /* create temp file */ 28 $fp = fopen($file_name, "w"); // temp file 31 // touch a file check stat, there should be difference in atime 32 echo "*** Testing stat() for file after using touch() on the file ***\n"; 59 *** Testing stat() for file after using touch() on the file ***
|
H A D | stat_variation2-win32.phpt | 2 Test stat() functions: usage variations - effects of writing to file 14 * Description: Gives information about a file 17 /* test the effects of writing to a file on the stats of the file */ 21 require "$file_path/file.inc"; 25 $file_handle = fopen($filename, "w"); // temp file 29 echo "*** Testing stat(): writing to a file ***\n"; 31 // writing to an empty file 32 echo "-- Testing stat() on file after data is written in it --\n"; 36 $file_handle = fopen($filename, "w"); // temp file 58 *** Testing stat(): writing to a file *** [all …]
|