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 /* Try reading some or all content of the file opened in write only mode */
15 // include the file.inc for common functions for test
16 include ("file.inc");
19 Description : Read data from file of size $read_size and verifies that $expected_size no. of
27 // print file pointer position before read
32 echo "Reading $read_size bytes from file, expecting $expect_size bytes ... ";
39 echo "Error reading file, total number of bytes read = ".strlen($data_from_file)."\n";
41 // file pointer position after read
43 // check if file pointer at eof()
59 echo "\n-- Testing fread() with file having content of type ". $file_content_type ." --\n";
61 /* open the file using $files_modes and perform fread() on it */
68 …$filename = dirname(__FILE__)."/fread_variation2.tmp"; // this is name of the file created by crea…
72 echo "Error: failed to fopen() file: $filename!";
81 echo "-- Reading entire file content, expeceted : 0 bytes --\n";
82 // read from file, by giving the file actual size,
88 // reading file by giving less than its size
89 echo "-- Reading file content less than max. file size, expeceted : 0 bytes --\n";
96 // now close the file
99 // delete the file created
100 delete_file($filename); // delete file
109 -- Testing fread() with file having content of type numeric --
111 -- Reading entire file content, expeceted : 0 bytes --
114 Reading 1024 bytes from file, expecting 0 bytes ... OK
118 -- Reading file content less than max. file size, expeceted : 0 bytes --
121 Reading 1000 bytes from file, expecting 0 bytes ... OK
126 -- Reading entire file content, expeceted : 0 bytes --
129 Reading 1024 bytes from file, expecting 0 bytes ... OK
133 -- Reading file content less than max. file size, expeceted : 0 bytes --
136 Reading 1000 bytes from file, expecting 0 bytes ... OK
141 -- Reading entire file content, expeceted : 0 bytes --
144 Reading 1024 bytes from file, expecting 0 bytes ... OK
148 -- Reading file content less than max. file size, expeceted : 0 bytes --
151 Reading 1000 bytes from file, expecting 0 bytes ... OK
156 -- Reading entire file content, expeceted : 0 bytes --
159 Reading 1024 bytes from file, expecting 0 bytes ... OK
163 -- Reading file content less than max. file size, expeceted : 0 bytes --
166 Reading 1000 bytes from file, expecting 0 bytes ... OK
171 -- Reading entire file content, expeceted : 0 bytes --
174 Reading 1024 bytes from file, expecting 0 bytes ... OK
178 -- Reading file content less than max. file size, expeceted : 0 bytes --
181 Reading 1000 bytes from file, expecting 0 bytes ... OK
186 -- Reading entire file content, expeceted : 0 bytes --
189 Reading 1024 bytes from file, expecting 0 bytes ... OK
193 -- Reading file content less than max. file size, expeceted : 0 bytes --
196 Reading 1000 bytes from file, expecting 0 bytes ... OK
201 -- Reading entire file content, expeceted : 0 bytes --
204 Reading 1024 bytes from file, expecting 0 bytes ... OK
208 -- Reading file content less than max. file size, expeceted : 0 bytes --
211 Reading 1000 bytes from file, expecting 0 bytes ... OK
216 -- Reading entire file content, expeceted : 0 bytes --
219 Reading 1024 bytes from file, expecting 0 bytes ... OK
223 -- Reading file content less than max. file size, expeceted : 0 bytes --
226 Reading 1000 bytes from file, expecting 0 bytes ... OK
231 -- Reading entire file content, expeceted : 0 bytes --
234 Reading 1024 bytes from file, expecting 0 bytes ... OK
238 -- Reading file content less than max. file size, expeceted : 0 bytes --
241 Reading 1000 bytes from file, expecting 0 bytes ... OK
246 -- Testing fread() with file having content of type text --
248 -- Reading entire file content, expeceted : 0 bytes --
251 Reading 1024 bytes from file, expecting 0 bytes ... OK
255 -- Reading file content less than max. file size, expeceted : 0 bytes --
258 Reading 1000 bytes from file, expecting 0 bytes ... OK
263 -- Reading entire file content, expeceted : 0 bytes --
266 Reading 1024 bytes from file, expecting 0 bytes ... OK
270 -- Reading file content less than max. file size, expeceted : 0 bytes --
273 Reading 1000 bytes from file, expecting 0 bytes ... OK
278 -- Reading entire file content, expeceted : 0 bytes --
281 Reading 1024 bytes from file, expecting 0 bytes ... OK
285 -- Reading file content less than max. file size, expeceted : 0 bytes --
288 Reading 1000 bytes from file, expecting 0 bytes ... OK
293 -- Reading entire file content, expeceted : 0 bytes --
296 Reading 1024 bytes from file, expecting 0 bytes ... OK
300 -- Reading file content less than max. file size, expeceted : 0 bytes --
303 Reading 1000 bytes from file, expecting 0 bytes ... OK
308 -- Reading entire file content, expeceted : 0 bytes --
311 Reading 1024 bytes from file, expecting 0 bytes ... OK
315 -- Reading file content less than max. file size, expeceted : 0 bytes --
318 Reading 1000 bytes from file, expecting 0 bytes ... OK
323 -- Reading entire file content, expeceted : 0 bytes --
326 Reading 1024 bytes from file, expecting 0 bytes ... OK
330 -- Reading file content less than max. file size, expeceted : 0 bytes --
333 Reading 1000 bytes from file, expecting 0 bytes ... OK
338 -- Reading entire file content, expeceted : 0 bytes --
341 Reading 1024 bytes from file, expecting 0 bytes ... OK
345 -- Reading file content less than max. file size, expeceted : 0 bytes --
348 Reading 1000 bytes from file, expecting 0 bytes ... OK
353 -- Reading entire file content, expeceted : 0 bytes --
356 Reading 1024 bytes from file, expecting 0 bytes ... OK
360 -- Reading file content less than max. file size, expeceted : 0 bytes --
363 Reading 1000 bytes from file, expecting 0 bytes ... OK
368 -- Reading entire file content, expeceted : 0 bytes --
371 Reading 1024 bytes from file, expecting 0 bytes ... OK
375 -- Reading file content less than max. file size, expeceted : 0 bytes --
378 Reading 1000 bytes from file, expecting 0 bytes ... OK
383 -- Testing fread() with file having content of type text_with_new_line --
385 -- Reading entire file content, expeceted : 0 bytes --
388 Reading 1024 bytes from file, expecting 0 bytes ... OK
392 -- Reading file content less than max. file size, expeceted : 0 bytes --
395 Reading 1000 bytes from file, expecting 0 bytes ... OK
400 -- Reading entire file content, expeceted : 0 bytes --
403 Reading 1024 bytes from file, expecting 0 bytes ... OK
407 -- Reading file content less than max. file size, expeceted : 0 bytes --
410 Reading 1000 bytes from file, expecting 0 bytes ... OK
415 -- Reading entire file content, expeceted : 0 bytes --
418 Reading 1024 bytes from file, expecting 0 bytes ... OK
422 -- Reading file content less than max. file size, expeceted : 0 bytes --
425 Reading 1000 bytes from file, expecting 0 bytes ... OK
430 -- Reading entire file content, expeceted : 0 bytes --
433 Reading 1024 bytes from file, expecting 0 bytes ... OK
437 -- Reading file content less than max. file size, expeceted : 0 bytes --
440 Reading 1000 bytes from file, expecting 0 bytes ... OK
445 -- Reading entire file content, expeceted : 0 bytes --
448 Reading 1024 bytes from file, expecting 0 bytes ... OK
452 -- Reading file content less than max. file size, expeceted : 0 bytes --
455 Reading 1000 bytes from file, expecting 0 bytes ... OK
460 -- Reading entire file content, expeceted : 0 bytes --
463 Reading 1024 bytes from file, expecting 0 bytes ... OK
467 -- Reading file content less than max. file size, expeceted : 0 bytes --
470 Reading 1000 bytes from file, expecting 0 bytes ... OK
475 -- Reading entire file content, expeceted : 0 bytes --
478 Reading 1024 bytes from file, expecting 0 bytes ... OK
482 -- Reading file content less than max. file size, expeceted : 0 bytes --
485 Reading 1000 bytes from file, expecting 0 bytes ... OK
490 -- Reading entire file content, expeceted : 0 bytes --
493 Reading 1024 bytes from file, expecting 0 bytes ... OK
497 -- Reading file content less than max. file size, expeceted : 0 bytes --
500 Reading 1000 bytes from file, expecting 0 bytes ... OK
505 -- Reading entire file content, expeceted : 0 bytes --
508 Reading 1024 bytes from file, expecting 0 bytes ... OK
512 -- Reading file content less than max. file size, expeceted : 0 bytes --
515 Reading 1000 bytes from file, expecting 0 bytes ... OK
520 -- Testing fread() with file having content of type alphanumeric --
522 -- Reading entire file content, expeceted : 0 bytes --
525 Reading 1024 bytes from file, expecting 0 bytes ... OK
529 -- Reading file content less than max. file size, expeceted : 0 bytes --
532 Reading 1000 bytes from file, expecting 0 bytes ... OK
537 -- Reading entire file content, expeceted : 0 bytes --
540 Reading 1024 bytes from file, expecting 0 bytes ... OK
544 -- Reading file content less than max. file size, expeceted : 0 bytes --
547 Reading 1000 bytes from file, expecting 0 bytes ... OK
552 -- Reading entire file content, expeceted : 0 bytes --
555 Reading 1024 bytes from file, expecting 0 bytes ... OK
559 -- Reading file content less than max. file size, expeceted : 0 bytes --
562 Reading 1000 bytes from file, expecting 0 bytes ... OK
567 -- Reading entire file content, expeceted : 0 bytes --
570 Reading 1024 bytes from file, expecting 0 bytes ... OK
574 -- Reading file content less than max. file size, expeceted : 0 bytes --
577 Reading 1000 bytes from file, expecting 0 bytes ... OK
582 -- Reading entire file content, expeceted : 0 bytes --
585 Reading 1024 bytes from file, expecting 0 bytes ... OK
589 -- Reading file content less than max. file size, expeceted : 0 bytes --
592 Reading 1000 bytes from file, expecting 0 bytes ... OK
597 -- Reading entire file content, expeceted : 0 bytes --
600 Reading 1024 bytes from file, expecting 0 bytes ... OK
604 -- Reading file content less than max. file size, expeceted : 0 bytes --
607 Reading 1000 bytes from file, expecting 0 bytes ... OK
612 -- Reading entire file content, expeceted : 0 bytes --
615 Reading 1024 bytes from file, expecting 0 bytes ... OK
619 -- Reading file content less than max. file size, expeceted : 0 bytes --
622 Reading 1000 bytes from file, expecting 0 bytes ... OK
627 -- Reading entire file content, expeceted : 0 bytes --
630 Reading 1024 bytes from file, expecting 0 bytes ... OK
634 -- Reading file content less than max. file size, expeceted : 0 bytes --
637 Reading 1000 bytes from file, expecting 0 bytes ... OK
642 -- Reading entire file content, expeceted : 0 bytes --
645 Reading 1024 bytes from file, expecting 0 bytes ... OK
649 -- Reading file content less than max. file size, expeceted : 0 bytes --
652 Reading 1000 bytes from file, expecting 0 bytes ... OK