fileinode
PHP function
Edit on GitHub ✎
(PHP 4, PHP 5, PHP 7, PHP 8)
Gets file inode
Description
fileinode(string $filename): int|false
Gets the file inode.
Parameters
filenamePath to the file.
Return Values
Returns the inode number of the file, Falseforfailure.
Errors/Exceptions Failure
Examples
Comparing the inode of a file with the current file
php
<?php
$filename = 'index.php';
if (getmyinode() == fileinode($filename)) {
echo 'You are checking the current file.';
}
?>