4 * Prototype: array stat ( string $filename );
5 * Description: Gives information about a file
8 /* test the stats of file opened in write mode and then same in read mode */
10 $file_path = dirname(__FILE__
);
11 require "$file_path/file.inc";
14 $file_handle = fopen("$file_path/stat_variation5.tmp", "w"); // temp file
18 echo "\n*** Testing stat(): on a file with read/write permission ***\n";
20 $filename = "$file_path/stat_variation5.tmp";
21 $file_handle = fopen($filename, "w"); // create file
23 $old_stat = stat($filename);
27 // opening file again in read mode
28 $file_handle = fopen($filename, "r"); // read file
30 $new_stat = stat($filename);
32 var_dump( compare_self_stat($old_stat) );
33 var_dump( compare_self_stat($new_stat) );
35 $affected_members = array(10, 'ctime');
36 var_dump( compare_stats($old_stat, $new_stat, $affected_members, "=") );
41 echo "\n*** Done ***";
44 $file_path = dirname(__FILE__
);
45 unlink("$file_path/stat_variation5.tmp");