fstat

(PHP 4 >= 4.0.0)

fstat --  Gets information about a file using an open file pointer

Description

array fstat ( int fp)

Gathers the statistics of the file opened by the file pointer fp. This function is similar to the stat() function except that it operates on an open file pointer instead of a filename.

Returns an array with the statistics of the file with the following elements:

  1. device

  2. inode

  3. number of links

  4. user id of owner

  5. group id owner

  6. device type if inode device *

  7. size in bytes

  8. time of last access

  9. time of last modification

  10. time of last change

  11. blocksize for filesystem I/O *

  12. number of blocks allocated

* - only valid on systems supporting the st_blksize type--other systems (i.e. Windows) return -1

The results of this function are cached. See clearstatcache() for more details.