PHP fileinode() Function
Definition
The fileinode() function returns the inode of the specified file.
Syntax
PHP fileinode() Function has the following syntax.
fileinode(filename)
Parameter
Parameter | Is Rwuired | Description |
---|---|---|
filename | Required. | File to check |
Return
This function returns the inode number of the file on success, FALSE on failure.
Note
The result of this function are cached. Use clearstatcache() to clear the cache.
This function doesn't produce useful results on Windows systems.
Example
<?php// www . j ava2 s . co m
$filename = 'test.txt';
if (getmyinode() == fileinode($filename)) {
echo 'You are checking the current file.';
}
echo fileinode("test.txt");
?>
The code above generates the following result.