fstat

It returns information about a file using an open file pointer

Example

<?php

$fp = fopen(‘test.txt’, ‘r’);

$stats = fstat($fp);

echo “<pre>”;

print_r($stats);

?>

Output

Array
(
[0] => 2049
[1] => 673768
[2] => 33279
[3] => 1
[4] => 1000
[5] => 1000
[6] => 0
[7] => 8
[8] => 1336732795
[9] => 1336732794
[10] => 1336732794
[11] => 4096
[12] => 8
[dev] => 2049
[ino] => 673768
[mode] => 33279
[nlink] => 1
[uid] => 1000
[gid] => 1000
[rdev] => 0
[size] => 8
[atime] => 1336732795
[mtime] => 1336732794
[ctime] => 1336732794
[blksize] => 4096
[blocks] => 8
)

Share