mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
file_get_wrapper_data renamed to file_get_meta_data and expanded.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@96988 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6a490ecdb7
commit
7b4aac161d
2 changed files with 120 additions and 52 deletions
120
reference/filesystem/functions/file-get-meta-data.xml
Normal file
120
reference/filesystem/functions/file-get-meta-data.xml
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id="function.file-get-meta-data">
|
||||
<refnamediv>
|
||||
<refname>file_get_meta_data</refname>
|
||||
<refpurpose>Retrieves header/meta data from streams/file pointers</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>file_get_meta_data</methodname>
|
||||
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns information about an existing <parameter>stream</parameter>.
|
||||
The stream can be any stream created by <function>fopen</function>,
|
||||
<function>fsockopen</function> and <function>pfsockopen</function>.
|
||||
The result array contains the following items:
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>timed_out</parameter> (bool) - &true; if the stream
|
||||
timed out while waiting for data on the last call to
|
||||
<function>fread</function> or <function>fgets</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>blocked</parameter> (bool) - &true; if the stream is
|
||||
in blocking IO mode. See <function>socket_set_blocking</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>eof</parameter> (bool) - &true; if the stream has reached
|
||||
end-of-file. Note that for socket streams this member can be &true;
|
||||
even when <parameter>unread_bytes</parameter> is non-zero. To
|
||||
determine if there is more data to be read, use
|
||||
<function>feof</function> instead of reading this item.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>unread_bytes</parameter> (int) - the number of bytes
|
||||
currently contained in the read buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<simpara>
|
||||
The following items were added in PHP 4.3:
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>stream_type</parameter> (string) - a label describing
|
||||
the underlying implementation of the stream.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>wrapper_type</parameter> (string) - a label describing
|
||||
the protocol wrapper implementation layered over the stream.
|
||||
See <xref linkend="wrappers"/> for more information about wrappers.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>wrapper_data</parameter> (mixed) - wrapper specific
|
||||
data attached to this stream. See <xref linkend="wrappers"/> for
|
||||
more information about wrappers and their wrapper data.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>filters</parameter> (array) - and array containing
|
||||
the names of any filters that have been stacked onto this stream.
|
||||
Filters are currently undocumented.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<note>
|
||||
<para>
|
||||
This function was introduced in PHP 4.3, but prior to this version,
|
||||
<function>socket_get_status</function> could be used to retrieve
|
||||
the first four items, for <emphasis>socket based streams only</emphasis>.
|
||||
</para>
|
||||
<para>
|
||||
In PHP 4.3 and later,
|
||||
<function>socket_get_status</function> is an alias for this function.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>This function does NOT work on sockets created by the <link
|
||||
linkend="ref.sockets">Socket extension</link>.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.129 -->
|
||||
<refentry id="function.file-get-wrapper-data">
|
||||
<refnamediv>
|
||||
<refname>file_get_wrapper_data</refname>
|
||||
<refpurpose>Retrieves header/meta data from "wrapped" file pointers</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>file_get_wrapper_data</methodname>
|
||||
<methodparam><type>int</type><parameter>fp</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
This function returns header or meta data from files opened with
|
||||
<function>fopen</function>. This is useful to return the response
|
||||
headers for HTTP connections, or some other statistics for other
|
||||
resources.
|
||||
</simpara>
|
||||
<simpara>
|
||||
The format of the returned data is deliberately undocumented at this
|
||||
time, and depends on which wrapper(s) were used to open the file.
|
||||
</simpara>
|
||||
<note>
|
||||
<para>
|
||||
This function was introduced in PHP 4.3.0.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue