Lines Matching refs:file

13  Description: Truncates a file to a given length
16 // include common file related test functions
17 include ("file.inc");
21 /* test ftruncate with file opened in different modes */
30 echo "\n-- Testing ftruncate() with file having data of type ". $file_content_type ." --\n";
33 echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n";
35 // create 1 file with some contents
38 // fopen the file using the $file_modes
43 // fopen the file using the $file_modes
47 echo "Error: failed to open file $filename!\n";
51 rewind($file_handle); // file pointer to 0
54 echo "-- Testing ftruncate(): truncate file to size = 0 --\n";
56 var_dump( filesize($filename) ); // check the current file size
63 var_dump( filesize($filename) ); // check the file size, should be 0
74 -- Testing ftruncate() with file having data of type numeric --
75 -- Testing ftruncate() with file opening using r mode --
76 -- Testing ftruncate(): truncate file to size = 0 --
83 -- Testing ftruncate() with file opening using rb mode --
84 -- Testing ftruncate(): truncate file to size = 0 --
91 -- Testing ftruncate() with file opening using rt mode --
92 -- Testing ftruncate(): truncate file to size = 0 --
99 -- Testing ftruncate() with file opening using r+ mode --
100 -- Testing ftruncate(): truncate file to size = 0 --
107 -- Testing ftruncate() with file opening using r+b mode --
108 -- Testing ftruncate(): truncate file to size = 0 --
115 -- Testing ftruncate() with file opening using r+t mode --
116 -- Testing ftruncate(): truncate file to size = 0 --
123 -- Testing ftruncate() with file opening using w mode --
124 -- Testing ftruncate(): truncate file to size = 0 --
131 -- Testing ftruncate() with file opening using wb mode --
132 -- Testing ftruncate(): truncate file to size = 0 --
139 -- Testing ftruncate() with file opening using wt mode --
140 -- Testing ftruncate(): truncate file to size = 0 --
147 -- Testing ftruncate() with file opening using w+ mode --
148 -- Testing ftruncate(): truncate file to size = 0 --
155 -- Testing ftruncate() with file opening using w+b mode --
156 -- Testing ftruncate(): truncate file to size = 0 --
163 -- Testing ftruncate() with file opening using w+t mode --
164 -- Testing ftruncate(): truncate file to size = 0 --
171 -- Testing ftruncate() with file opening using x mode --
172 -- Testing ftruncate(): truncate file to size = 0 --
179 -- Testing ftruncate() with file opening using xb mode --
180 -- Testing ftruncate(): truncate file to size = 0 --
187 -- Testing ftruncate() with file opening using xt mode --
188 -- Testing ftruncate(): truncate file to size = 0 --
195 -- Testing ftruncate() with file opening using x+ mode --
196 -- Testing ftruncate(): truncate file to size = 0 --
203 -- Testing ftruncate() with file opening using x+b mode --
204 -- Testing ftruncate(): truncate file to size = 0 --
211 -- Testing ftruncate() with file opening using x+t mode --
212 -- Testing ftruncate(): truncate file to size = 0 --
219 -- Testing ftruncate() with file opening using a mode --
220 -- Testing ftruncate(): truncate file to size = 0 --
227 -- Testing ftruncate() with file opening using ab mode --
228 -- Testing ftruncate(): truncate file to size = 0 --
235 -- Testing ftruncate() with file opening using at mode --
236 -- Testing ftruncate(): truncate file to size = 0 --
243 -- Testing ftruncate() with file opening using a+ mode --
244 -- Testing ftruncate(): truncate file to size = 0 --
251 -- Testing ftruncate() with file opening using a+b mode --
252 -- Testing ftruncate(): truncate file to size = 0 --
259 -- Testing ftruncate() with file opening using a+t mode --
260 -- Testing ftruncate(): truncate file to size = 0 --
268 -- Testing ftruncate() with file having data of type text_with_new_line --
269 -- Testing ftruncate() with file opening using r mode --
270 -- Testing ftruncate(): truncate file to size = 0 --
277 -- Testing ftruncate() with file opening using rb mode --
278 -- Testing ftruncate(): truncate file to size = 0 --
285 -- Testing ftruncate() with file opening using rt mode --
286 -- Testing ftruncate(): truncate file to size = 0 --
293 -- Testing ftruncate() with file opening using r+ mode --
294 -- Testing ftruncate(): truncate file to size = 0 --
301 -- Testing ftruncate() with file opening using r+b mode --
302 -- Testing ftruncate(): truncate file to size = 0 --
309 -- Testing ftruncate() with file opening using r+t mode --
310 -- Testing ftruncate(): truncate file to size = 0 --
317 -- Testing ftruncate() with file opening using w mode --
318 -- Testing ftruncate(): truncate file to size = 0 --
325 -- Testing ftruncate() with file opening using wb mode --
326 -- Testing ftruncate(): truncate file to size = 0 --
333 -- Testing ftruncate() with file opening using wt mode --
334 -- Testing ftruncate(): truncate file to size = 0 --
341 -- Testing ftruncate() with file opening using w+ mode --
342 -- Testing ftruncate(): truncate file to size = 0 --
349 -- Testing ftruncate() with file opening using w+b mode --
350 -- Testing ftruncate(): truncate file to size = 0 --
357 -- Testing ftruncate() with file opening using w+t mode --
358 -- Testing ftruncate(): truncate file to size = 0 --
365 -- Testing ftruncate() with file opening using x mode --
366 -- Testing ftruncate(): truncate file to size = 0 --
373 -- Testing ftruncate() with file opening using xb mode --
374 -- Testing ftruncate(): truncate file to size = 0 --
381 -- Testing ftruncate() with file opening using xt mode --
382 -- Testing ftruncate(): truncate file to size = 0 --
389 -- Testing ftruncate() with file opening using x+ mode --
390 -- Testing ftruncate(): truncate file to size = 0 --
397 -- Testing ftruncate() with file opening using x+b mode --
398 -- Testing ftruncate(): truncate file to size = 0 --
405 -- Testing ftruncate() with file opening using x+t mode --
406 -- Testing ftruncate(): truncate file to size = 0 --
413 -- Testing ftruncate() with file opening using a mode --
414 -- Testing ftruncate(): truncate file to size = 0 --
421 -- Testing ftruncate() with file opening using ab mode --
422 -- Testing ftruncate(): truncate file to size = 0 --
429 -- Testing ftruncate() with file opening using at mode --
430 -- Testing ftruncate(): truncate file to size = 0 --
437 -- Testing ftruncate() with file opening using a+ mode --
438 -- Testing ftruncate(): truncate file to size = 0 --
445 -- Testing ftruncate() with file opening using a+b mode --
446 -- Testing ftruncate(): truncate file to size = 0 --
453 -- Testing ftruncate() with file opening using a+t mode --
454 -- Testing ftruncate(): truncate file to size = 0 --