3 Prototype: int fileinode ( string $filename );
4 Description: Returns the inode number of the file, or FALSE in case of an error.
7 /* Passing file names with different notations, using slashes, wild-card chars */
9 $file_path = dirname(__FILE__
);
11 echo "*** Testing fileinode() with different notations of file names ***\n";
12 $dir_name = $file_path."/fileinode_variation3";
14 $file_handle = fopen($dir_name."/fileinode_variation3.tmp", "w");
18 "/fileinode_variation3/fileinode_variation3.tmp",
20 /* Testing a file trailing slash */
21 "/fileinode_variation3/fileinode_variation3.tmp/",
23 /* Testing file with double slashes */
24 "/fileinode_variation3//fileinode_variation3.tmp",
25 "//fileinode_variation3//fileinode_variation3.tmp",
26 "/fileinode_variation3/*.tmp",
27 "fileinode_variation3/fileinode*.tmp",
29 /* Testing Binary safe */
30 "/fileinode_variation3/fileinode_variation3.tmp".chr(0),
31 "/fileinode_variation3/fileinode_variation3.tmp\0"
35 /* loop through to test each element in the above array */
36 foreach($files_arr as $file) {
37 echo "- Iteration $count -\n";
38 var_dump( fileinode( $file_path."/".$file ) );
43 echo "\n*** Done ***";
45 $file_path = dirname(__FILE__
);
46 $dir_name = $file_path."/fileinode_variation3";
47 unlink($dir_name."/fileinode_variation3.tmp");