IT. Expert System.

PHP

Gets information about a file using an open file pointer


fstat

(PHP 4, PHP 5)

fstatGets information about a file using an open file pointer

Description

array fstat ( resource $handle )

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

Parameters

handle

A file system pointer resource that is typically created using fopen().

Return Values

Returns an array with the statistics of the file; the format of the array is described in detail on the stat() manual page.

Examples

Example #1 fstat() example

<?php

// open a file
$fp fopen("/etc/passwd""r");

// gather statistics
$fstat fstat($fp);

// close the file
fclose($fp);

// print only the associative part
print_r(array_slice($fstat13));

?>

The above example will output something similar to:

 Array (  [dev] => 771  [ino] => 488704  [mode] => 33188  [nlink] => 1  [uid] => 0  [gid] => 0  [rdev] => 0  [size] => 1114  [atime] => 1061067181  [mtime] => 1056136526  [ctime] => 1056136526  [blksize] => 4096  [blocks] => 8 ) 

Notes

Note: This function will not work on remote files as the file to be examined must be accessible via the server's filesystem.



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1180 / 158736158. Delta: 0.00355 с