mirror of
https://github.com/php/doc-es.git
synced 2026-04-26 00:28:03 +02:00
8c621d3157
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@324250 c90b9560-bf6c-de11-be94-00142212c4b1
167 lines
3.9 KiB
XML
167 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 5faa7a6747bca628b3bdcc9f93aec5603b65581f Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no Maintainer: andresdzphp -->
|
|
|
|
<refentry xml:id="function.eio-stat" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>eio_stat</refname>
|
|
<refpurpose>Obtener el estado de un fichero</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>eio_stat</methodname>
|
|
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
|
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
|
|
<methodparam
|
|
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>eio_stat</function> devuelve la información del estado de un fichero en
|
|
el argumento <parameter>result</parameter> de <parameter>callback</parameter>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>path</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La ruta de archivo
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>pri</parameter></term>
|
|
<listitem>
|
|
&eio.request.pri.values;
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>callback</parameter></term>
|
|
<listitem>
|
|
&eio.callback.proto;
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>data</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Variable arbitraria pasada a <parameter>callback</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
<function>eio_stat</function>devuelve un recurso de petición en caso de éxito o
|
|
&false; en caso de error. En caso de éxito asigna el argumento <parameter>result</parameter> de
|
|
<parameter>callback</parameter> a un array.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Ejemplo de <function>eio_stat</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$nombre_fichero_temp = "fichero-eio.tmp";
|
|
touch($nombre_fichero_temp);
|
|
|
|
function my_res_cb($datos, $resultado) {
|
|
var_dump($datos);
|
|
var_dump($resultado);
|
|
}
|
|
|
|
function my_open_cb($datos, $resultado) {
|
|
eio_close($resultado);
|
|
eio_event_loop();
|
|
|
|
@unlink($datos);
|
|
}
|
|
|
|
eio_stat($nombre_fichero_temp, EIO_PRI_DEFAULT, "my_res_cb", "eio_stat");
|
|
eio_open($nombre_fichero_temp, EIO_O_RDONLY, NULL,
|
|
EIO_PRI_DEFAULT, "my_open_cb", $nombre_fichero_temp);
|
|
eio_event_loop();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
string(8) "eio_stat"
|
|
array(12) {
|
|
["st_dev"]=>
|
|
int(2050)
|
|
["st_ino"]=>
|
|
int(2489173)
|
|
["st_mode"]=>
|
|
int(33188)
|
|
["st_nlink"]=>
|
|
int(1)
|
|
["st_uid"]=>
|
|
int(1000)
|
|
["st_gid"]=>
|
|
int(100)
|
|
["st_rdev"]=>
|
|
int(0)
|
|
["st_blksize"]=>
|
|
int(4096)
|
|
["st_blocks"]=>
|
|
int(0)
|
|
["st_atime"]=>
|
|
int(1318250380)
|
|
["st_mtime"]=>
|
|
int(1318250380)
|
|
["st_ctime"]=>
|
|
int(1318250380)
|
|
}
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member>eio_lstat</member>
|
|
<member>eio_fstat</member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|