Lines Matching refs:file

7  Description: reads up to length bytes from the file pointer referenced by handle. 
8 Reading stops when up to length bytes have been read, EOF (end of file) is
13 /* Read content less than file size &
14 Read entire file
17 // include the file.inc for common functions for test
18 include ("file.inc");
21 Description : Read data from file of size $read_size and verifies that $expected_size no. of
29 // print file pointer position before read
34 echo "Reading $read_size bytes from file, expecting $expect_size bytes ... ";
41 echo "Error reading file, total number of bytes read = ".strlen($data_from_file)."\n";
43 // file pointer position after read
45 // check if file pointer at eof()
60 echo "\n-- Testing fread() with file having content of type ". $file_content_type ." --\n";
62 /* open the file using $files_modes and perform fread() on it */
69 …$filename = dirname(__FILE__)."/fread_variation1.tmp"; // this is name of the file created by crea…
73 echo "Error: failed to fopen() file: $filename!";
82 echo "-- Reading entire file content, expeceted : 1024 bytes --\n";
83 // read from file, by giving the file actual size,
89 // reading file by giving less than its size
90 echo "-- Reading file content less than max. file size, expeceted : 1000 bytes --\n";
97 // now close the file
100 // delete the file created
101 delete_file($filename); // delete file
110 -- Testing fread() with file having content of type numeric --
112 -- Reading entire file content, expeceted : 1024 bytes --
115 Reading 1024 bytes from file, expecting 1024 bytes ... OK
119 -- Reading file content less than max. file size, expeceted : 1000 bytes --
122 Reading 1000 bytes from file, expecting 1000 bytes ... OK
127 -- Reading entire file content, expeceted : 1024 bytes --
130 Reading 1024 bytes from file, expecting 1024 bytes ... OK
134 -- Reading file content less than max. file size, expeceted : 1000 bytes --
137 Reading 1000 bytes from file, expecting 1000 bytes ... OK
142 -- Reading entire file content, expeceted : 1024 bytes --
145 Reading 1024 bytes from file, expecting 1024 bytes ... OK
149 -- Reading file content less than max. file size, expeceted : 1000 bytes --
152 Reading 1000 bytes from file, expecting 1000 bytes ... OK
157 -- Reading entire file content, expeceted : 1024 bytes --
160 Reading 1024 bytes from file, expecting 1024 bytes ... OK
164 -- Reading file content less than max. file size, expeceted : 1000 bytes --
167 Reading 1000 bytes from file, expecting 1000 bytes ... OK
172 -- Reading entire file content, expeceted : 1024 bytes --
175 Reading 1024 bytes from file, expecting 1024 bytes ... OK
179 -- Reading file content less than max. file size, expeceted : 1000 bytes --
182 Reading 1000 bytes from file, expecting 1000 bytes ... OK
187 -- Reading entire file content, expeceted : 1024 bytes --
190 Reading 1024 bytes from file, expecting 1024 bytes ... OK
194 -- Reading file content less than max. file size, expeceted : 1000 bytes --
197 Reading 1000 bytes from file, expecting 1000 bytes ... OK
202 -- Reading entire file content, expeceted : 1024 bytes --
205 Reading 1024 bytes from file, expecting 1024 bytes ... OK
209 -- Reading file content less than max. file size, expeceted : 1000 bytes --
212 Reading 1000 bytes from file, expecting 1000 bytes ... OK
217 -- Reading entire file content, expeceted : 1024 bytes --
220 Reading 1024 bytes from file, expecting 1024 bytes ... OK
224 -- Reading file content less than max. file size, expeceted : 1000 bytes --
227 Reading 1000 bytes from file, expecting 1000 bytes ... OK
232 -- Reading entire file content, expeceted : 1024 bytes --
235 Reading 1024 bytes from file, expecting 1024 bytes ... OK
239 -- Reading file content less than max. file size, expeceted : 1000 bytes --
242 Reading 1000 bytes from file, expecting 1000 bytes ... OK
247 -- Testing fread() with file having content of type text --
249 -- Reading entire file content, expeceted : 1024 bytes --
252 Reading 1024 bytes from file, expecting 1024 bytes ... OK
256 -- Reading file content less than max. file size, expeceted : 1000 bytes --
259 Reading 1000 bytes from file, expecting 1000 bytes ... OK
264 -- Reading entire file content, expeceted : 1024 bytes --
267 Reading 1024 bytes from file, expecting 1024 bytes ... OK
271 -- Reading file content less than max. file size, expeceted : 1000 bytes --
274 Reading 1000 bytes from file, expecting 1000 bytes ... OK
279 -- Reading entire file content, expeceted : 1024 bytes --
282 Reading 1024 bytes from file, expecting 1024 bytes ... OK
286 -- Reading file content less than max. file size, expeceted : 1000 bytes --
289 Reading 1000 bytes from file, expecting 1000 bytes ... OK
294 -- Reading entire file content, expeceted : 1024 bytes --
297 Reading 1024 bytes from file, expecting 1024 bytes ... OK
301 -- Reading file content less than max. file size, expeceted : 1000 bytes --
304 Reading 1000 bytes from file, expecting 1000 bytes ... OK
309 -- Reading entire file content, expeceted : 1024 bytes --
312 Reading 1024 bytes from file, expecting 1024 bytes ... OK
316 -- Reading file content less than max. file size, expeceted : 1000 bytes --
319 Reading 1000 bytes from file, expecting 1000 bytes ... OK
324 -- Reading entire file content, expeceted : 1024 bytes --
327 Reading 1024 bytes from file, expecting 1024 bytes ... OK
331 -- Reading file content less than max. file size, expeceted : 1000 bytes --
334 Reading 1000 bytes from file, expecting 1000 bytes ... OK
339 -- Reading entire file content, expeceted : 1024 bytes --
342 Reading 1024 bytes from file, expecting 1024 bytes ... OK
346 -- Reading file content less than max. file size, expeceted : 1000 bytes --
349 Reading 1000 bytes from file, expecting 1000 bytes ... OK
354 -- Reading entire file content, expeceted : 1024 bytes --
357 Reading 1024 bytes from file, expecting 1024 bytes ... OK
361 -- Reading file content less than max. file size, expeceted : 1000 bytes --
364 Reading 1000 bytes from file, expecting 1000 bytes ... OK
369 -- Reading entire file content, expeceted : 1024 bytes --
372 Reading 1024 bytes from file, expecting 1024 bytes ... OK
376 -- Reading file content less than max. file size, expeceted : 1000 bytes --
379 Reading 1000 bytes from file, expecting 1000 bytes ... OK
384 -- Testing fread() with file having content of type text_with_new_line --
386 -- Reading entire file content, expeceted : 1024 bytes --
389 Reading 1024 bytes from file, expecting 1024 bytes ... OK
393 -- Reading file content less than max. file size, expeceted : 1000 bytes --
396 Reading 1000 bytes from file, expecting 1000 bytes ... OK
401 -- Reading entire file content, expeceted : 1024 bytes --
404 Reading 1024 bytes from file, expecting 1024 bytes ... OK
408 -- Reading file content less than max. file size, expeceted : 1000 bytes --
411 Reading 1000 bytes from file, expecting 1000 bytes ... OK
416 -- Reading entire file content, expeceted : 1024 bytes --
419 Reading 1024 bytes from file, expecting 1024 bytes ... OK
423 -- Reading file content less than max. file size, expeceted : 1000 bytes --
426 Reading 1000 bytes from file, expecting 1000 bytes ... OK
431 -- Reading entire file content, expeceted : 1024 bytes --
434 Reading 1024 bytes from file, expecting 1024 bytes ... OK
438 -- Reading file content less than max. file size, expeceted : 1000 bytes --
441 Reading 1000 bytes from file, expecting 1000 bytes ... OK
446 -- Reading entire file content, expeceted : 1024 bytes --
449 Reading 1024 bytes from file, expecting 1024 bytes ... OK
453 -- Reading file content less than max. file size, expeceted : 1000 bytes --
456 Reading 1000 bytes from file, expecting 1000 bytes ... OK
461 -- Reading entire file content, expeceted : 1024 bytes --
464 Reading 1024 bytes from file, expecting 1024 bytes ... OK
468 -- Reading file content less than max. file size, expeceted : 1000 bytes --
471 Reading 1000 bytes from file, expecting 1000 bytes ... OK
476 -- Reading entire file content, expeceted : 1024 bytes --
479 Reading 1024 bytes from file, expecting 1024 bytes ... OK
483 -- Reading file content less than max. file size, expeceted : 1000 bytes --
486 Reading 1000 bytes from file, expecting 1000 bytes ... OK
491 -- Reading entire file content, expeceted : 1024 bytes --
494 Reading 1024 bytes from file, expecting 1024 bytes ... OK
498 -- Reading file content less than max. file size, expeceted : 1000 bytes --
501 Reading 1000 bytes from file, expecting 1000 bytes ... OK
506 -- Reading entire file content, expeceted : 1024 bytes --
509 Reading 1024 bytes from file, expecting 1024 bytes ... OK
513 -- Reading file content less than max. file size, expeceted : 1000 bytes --
516 Reading 1000 bytes from file, expecting 1000 bytes ... OK
521 -- Testing fread() with file having content of type alphanumeric --
523 -- Reading entire file content, expeceted : 1024 bytes --
526 Reading 1024 bytes from file, expecting 1024 bytes ... OK
530 -- Reading file content less than max. file size, expeceted : 1000 bytes --
533 Reading 1000 bytes from file, expecting 1000 bytes ... OK
538 -- Reading entire file content, expeceted : 1024 bytes --
541 Reading 1024 bytes from file, expecting 1024 bytes ... OK
545 -- Reading file content less than max. file size, expeceted : 1000 bytes --
548 Reading 1000 bytes from file, expecting 1000 bytes ... OK
553 -- Reading entire file content, expeceted : 1024 bytes --
556 Reading 1024 bytes from file, expecting 1024 bytes ... OK
560 -- Reading file content less than max. file size, expeceted : 1000 bytes --
563 Reading 1000 bytes from file, expecting 1000 bytes ... OK
568 -- Reading entire file content, expeceted : 1024 bytes --
571 Reading 1024 bytes from file, expecting 1024 bytes ... OK
575 -- Reading file content less than max. file size, expeceted : 1000 bytes --
578 Reading 1000 bytes from file, expecting 1000 bytes ... OK
583 -- Reading entire file content, expeceted : 1024 bytes --
586 Reading 1024 bytes from file, expecting 1024 bytes ... OK
590 -- Reading file content less than max. file size, expeceted : 1000 bytes --
593 Reading 1000 bytes from file, expecting 1000 bytes ... OK
598 -- Reading entire file content, expeceted : 1024 bytes --
601 Reading 1024 bytes from file, expecting 1024 bytes ... OK
605 -- Reading file content less than max. file size, expeceted : 1000 bytes --
608 Reading 1000 bytes from file, expecting 1000 bytes ... OK
613 -- Reading entire file content, expeceted : 1024 bytes --
616 Reading 1024 bytes from file, expecting 1024 bytes ... OK
620 -- Reading file content less than max. file size, expeceted : 1000 bytes --
623 Reading 1000 bytes from file, expecting 1000 bytes ... OK
628 -- Reading entire file content, expeceted : 1024 bytes --
631 Reading 1024 bytes from file, expecting 1024 bytes ... OK
635 -- Reading file content less than max. file size, expeceted : 1000 bytes --
638 Reading 1000 bytes from file, expecting 1000 bytes ... OK
643 -- Reading entire file content, expeceted : 1024 bytes --
646 Reading 1024 bytes from file, expecting 1024 bytes ... OK
650 -- Reading file content less than max. file size, expeceted : 1000 bytes --
653 Reading 1000 bytes from file, expecting 1000 bytes ... OK