-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial translation in eio/functions
- Loading branch information
1 parent
2911d6d
commit 4e41df3
Showing
6 changed files
with
685 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: a4fe8cf4c7712c4af6d2b0dc2e3d7090f53f4e21 Maintainer: leonardolara Status: ready --> | ||
|
||
<refentry xml:id="function.eio-fdatasync" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>eio_fdatasync</refname> | ||
<refpurpose>Sincroniza o estado central de um arquivo com o dispositivo de armazenamento</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type>resource</type><methodname>eio_fdatasync</methodname> | ||
<methodparam><type>mixed</type><parameter>fd</parameter></methodparam> | ||
<methodparam | ||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam> | ||
<methodparam | ||
choice="opt"><type>callable</type><parameter>callback</parameter><initializer>NULL</initializer></methodparam> | ||
<methodparam | ||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>eio_fdatasync</function> sincroniza o estado central de um arquivo com o dispositivo de armazenamento. | ||
</para> | ||
|
||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>fd</parameter></term> | ||
<listitem> | ||
<para> | ||
Fluxo, recurso de socket ou descritor numérico de arquivo, por exemplo, retornado por <function>eio_open</function>. | ||
</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> | ||
Variável arbitrária passada para <parameter>callback</parameter>. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
<function>eio_fdatasync</function> retorna o recurso da requisição em caso de sucesso,&return.falseforfailure;. | ||
</para> | ||
</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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: a4fe8cf4c7712c4af6d2b0dc2e3d7090f53f4e21 Maintainer: leonardolara Status: ready --> | ||
|
||
<refentry xml:id="function.eio-fstat" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>eio_fstat</refname> | ||
<refpurpose>Obtém status de arquivo</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type>resource</type><methodname>eio_fstat</methodname> | ||
<methodparam><type>mixed</type><parameter>fd</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></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>eio_fstat</function> retorna informação de status de arquivo no | ||
argumento <parameter>result</parameter> da função <parameter>callback</parameter>. | ||
</para> | ||
|
||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>fd</parameter></term> | ||
<listitem> | ||
<para> | ||
Fluxo, recurso de socket ou descritor numérico de arquivo. | ||
</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> | ||
Variável arbitrária passada para <parameter>callback</parameter>. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
<function>eio_busy</function> retorna o recurso da requisição em caso de sucesso,&return.falseforfailure;. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<example> | ||
<title>Exemplo de <function>eio_lstat</function></title> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
// Cria arquivo temporário | ||
$tmp_filename = dirname(__FILE__) ."/eio-file.tmp"; | ||
touch($tmp_filename); | ||
/* Função chamada quando eio_fstat() termina */ | ||
function my_res_cb($data, $result) { | ||
// Deve resultar em um array com informação de status | ||
var_dump($result); | ||
if ($data['fd']) { | ||
// Fecha arquivo temporário | ||
eio_close($data['fd']); | ||
eio_event_loop(); | ||
} | ||
// Remove arquivo temporário | ||
@unlink($data['file']); | ||
} | ||
/* Função chamada quando eio_open() termina */ | ||
function my_open_cb($data, $result) { | ||
// Prepara dados para chamada de retorno | ||
$d = [ | ||
'fd' => $result, | ||
'file'=> $data | ||
]; | ||
// Solicita informação de status | ||
eio_fstat($result, EIO_PRI_DEFAULT, "my_res_cb", $d); | ||
// Processa solicitações | ||
eio_event_loop(); | ||
} | ||
// Abre arquivo temporário | ||
eio_open($tmp_filename, EIO_O_RDONLY, NULL, EIO_PRI_DEFAULT, | ||
"my_open_cb", $tmp_filename); | ||
eio_event_loop(); | ||
?> | ||
]]> | ||
</programlisting> | ||
&example.outputs.similar; | ||
<screen> | ||
<![CDATA[ | ||
array(12) { | ||
["st_dev"]=> | ||
int(2050) | ||
["st_ino"]=> | ||
int(2489159) | ||
["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(1318239506) | ||
["st_mtime"]=> | ||
int(1318239506) | ||
["st_ctime"]=> | ||
int(1318239506) | ||
} | ||
]]> | ||
</screen> | ||
</example> | ||
</refsect1> | ||
|
||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><function>eio_lstat</function></member> | ||
<member><function>eio_stat</function></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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: a4fe8cf4c7712c4af6d2b0dc2e3d7090f53f4e21 Maintainer: leonardolara Status: ready --> | ||
|
||
<refentry xml:id="function.eio-fstatvfs" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>eio_fstatvfs</refname> | ||
<refpurpose>Obtém estatísticas de sistema de um arquivo</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type>resource</type><methodname>eio_fstatvfs</methodname> | ||
<methodparam><type>mixed</type><parameter>fd</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></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>eio_fstatvfs</function> retorna estatísticas de sistema de um arquivo no argumento | ||
<parameter>result</parameter> da função <parameter>callback</parameter>. | ||
</para> | ||
|
||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>fd</parameter></term> | ||
<listitem> | ||
<para> | ||
Um descritor de arquivo no sistema de arquivos montado. | ||
</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> | ||
Variável arbitrária passada para <parameter>callback</parameter>. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
<function>eio_fstatvfs</function> retorna o recurso da requisição em caso de sucesso,&return.falseforfailure;. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><function>eio_statvfs</function></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 | ||
--> |
Oops, something went wrong.