fstat
-
The PHP function
fstatworks the same asstat, only it takes an open stream resource as its input instead of a filename.PHP
$f = fopen('/path/to/foobar', 'r'); $stat = fstat($f); fclose($f) print $stat['ino']; //=> 16793883
For an open file in Ruby, you can call the
File#statinstance method.Ruby
f = File.open('/path/to/foobar', 'r') stat = f.stat f.close p stat.ino #=> 16793883
see also
Looking for Rails or PHP web application development, integration, and training?
Rails for PHP is brought to you by Maintainable Software. Get custom web applications and personalized training from the authors of the book and website.

