The fileinode() function returns the inode of the specified file.
PHP fileinode() Function has the following syntax.
fileinode(filename)
Parameter | Is Rwuired | Description |
---|---|---|
filename | Required. | File to check |
This function returns the inode number of the file on success, FALSE on failure.
The result of this function are cached. Use clearstatcache() to clear the cache.
This function doesn't produce useful results on Windows systems.
<?php
$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.