mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
Add: eio docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@317979 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
<listitem><simpara><xref linkend="book.dom"/></simpara></listitem>
|
||||
<listitem><simpara><xref linkend="book.domxml"/></simpara></listitem>
|
||||
<listitem><simpara><xref linkend="book.dotnet"/></simpara></listitem>
|
||||
<listitem><simpara><xref linkend="book.eio"/></simpara></listitem>
|
||||
<listitem><simpara><xref linkend="book.enchant"/></simpara></listitem>
|
||||
<listitem><simpara><xref linkend="book.errorfunc"/></simpara></listitem>
|
||||
<listitem><simpara><xref linkend="book.exec"/></simpara></listitem>
|
||||
@@ -370,6 +371,7 @@
|
||||
<listitem><para><xref linkend="book.dbx"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.dom"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.domxml"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.eio"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.enchant"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.fam"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.fbsql"/></para></listitem>
|
||||
@@ -474,6 +476,7 @@
|
||||
<listitem><para><xref linkend="book.dbx"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.dio"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.domxml"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.eio"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.enchant"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.expect"/></para></listitem>
|
||||
<listitem><para><xref linkend="book.fam"/></para></listitem>
|
||||
|
||||
@@ -1511,3 +1511,39 @@ as opposed to emitting it. Setting to &false; (the default) will do the opposite
|
||||
</para>
|
||||
</refsect1>
|
||||
'>
|
||||
|
||||
<!-- Eio -->
|
||||
<!ENTITY eio.callback.proto '<para xmlns="http://docbook.org/ns/docbook">Function specified by
|
||||
<parameter xmlns="http://docbook.org/ns/docbook">callback</parameter> is called when the request is done.
|
||||
<parameter xmlns="http://docbook.org/ns/docbook">callback</parameter> should match the following prototype:
|
||||
<programlisting role="php"><![CDATA[
|
||||
void callback($data, $result);
|
||||
]]>
|
||||
</programlisting>
|
||||
<parameter xmlns="http://docbook.org/ns/docbook">$data</parameter> is custom
|
||||
data passed in <emphasis>eio_*()</emphasis> call. <parameter
|
||||
xmlns="http://docbook.org/ns/docbook">$result</parameter> contains <emphasis
|
||||
xmlns="http://docbook.org/ns/docbook">eio_*</emphasis> function specific value.
|
||||
Basically, contains the same value as return value of corresponding POSIX
|
||||
system call. E.g. for <function
|
||||
xmlns="http://docbook.org/ns/docbook">eio_open</function> it is a file
|
||||
descriptor.
|
||||
</para>
|
||||
'>
|
||||
|
||||
<!ENTITY eio.request.pri.values '<para
|
||||
xmlns="http://docbook.org/ns/docbook">The request priority: <constant
|
||||
xmlns="http://docbook.org/ns/docbook">EIO_PRI_DEFAULT</constant>, <constant
|
||||
xmlns="http://docbook.org/ns/docbook">EIO_PRI_MIN</constant>, <constant
|
||||
xmlns="http://docbook.org/ns/docbook">EIO_PRI_MAX</constant>, or &null;.
|
||||
If &null; passed, <parameter
|
||||
xmlns="http://docbook.org/ns/docbook">pri</parameter> internally is set to
|
||||
<constant xmlns="http://docbook.org/ns/docbook">EIO_PRI_DEFAULT</constant>.
|
||||
</para>
|
||||
'>
|
||||
|
||||
<!ENTITY eio.warn.relpath '<warning
|
||||
xmlns="http://docbook.org/ns/docbook"><simpara xmlns="http://docbook.org/ns/docbook">Avoid relative
|
||||
paths</simpara></warning>
|
||||
'>
|
||||
|
||||
|
||||
45
reference/eio/book.xml
Normal file
45
reference/eio/book.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<book xml:id="book.eio" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Eio</title>
|
||||
<titleabbrev>Eio</titleabbrev>
|
||||
<!--{{{ preface -->
|
||||
<preface xml:id="intro.eio">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
This extension provides asyncronous POSIX I/O by means of <link
|
||||
xlink:href="&url.eio.libeio;">libeio</link> C
|
||||
library written by Marc Lehmann.
|
||||
|
||||
¬e.no-windows.extension;
|
||||
</para>
|
||||
</preface>
|
||||
<!--}}}-->
|
||||
&reference.eio.setup;
|
||||
&reference.eio.constants;
|
||||
&reference.eio.examples;
|
||||
&reference.eio.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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 fdm=marker
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
53
reference/eio/configure.xml
Normal file
53
reference/eio/configure.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<section xml:id="eio.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
<para>Basically, <option role="configure">--with-eio[=DIR]</option> option is
|
||||
enough to install the extension. But you might want to make output more
|
||||
verbose(to debug), or change shared memory key and permissions used for
|
||||
internal event loop. The following is a list of additional configuration
|
||||
flags and options.</para>
|
||||
|
||||
<para><option role="configure">--enable-eio-debug</option> makes output(logging)
|
||||
more verbose.</para>
|
||||
|
||||
<para><option role="configure">--with-eio-shm-key</option>
|
||||
option sets shared memory segment key. Default: /tmp/php-eio-shm
|
||||
</para>
|
||||
|
||||
<para><option role="configure">--with-eio-shm-prm</option>
|
||||
option sets shared memory segment permissions. Default: 0600
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<option role="configure">--with-eio-shm-key</option> and <option
|
||||
role="configure">--with-eio-shm-prm</option> are semaphore options.
|
||||
Semaphores are currently used in internal event loop implementation. The only
|
||||
thing to note is to provide unique ID for the semaphore key and sufficient
|
||||
priveleges to that. If you are not sure what these settings mean, just leave
|
||||
their defaults.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
648
reference/eio/constants.xml
Normal file
648
reference/eio/constants.xml
Normal file
@@ -0,0 +1,648 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<appendix xml:id="eio.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<para>Request priority constants:
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_PRI_* -->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_PRI_MIN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Request minimal prioriry
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_PRI_DEFAULT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Request default prioriry
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_PRI_MAX</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Request maximal prioriry
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--}}}-->
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Flags used with <function>eio_readdir</function>:
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_READDIR_* -->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_DENTS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>eio_readdir</function> flag. If specified, the result argument of the callback
|
||||
becomes an array with the following keys:
|
||||
|
||||
<literal>'names'</literal> - array of directory names
|
||||
|
||||
<literal>'dents'</literal> - array of <literal>struct
|
||||
eio_dirent</literal>-like arrays having the following keys each:
|
||||
|
||||
<literal>'name'</literal> - the directory name;
|
||||
|
||||
<literal>'type'</literal> - one of <emphasis>EIO_DT_*</emphasis>
|
||||
constants;
|
||||
|
||||
<literal>'inode'</literal> - the inode number, if available, otherwise
|
||||
unspecified;
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_DIRS_FIRST</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
When this flag is specified, the names will be returned in an order
|
||||
where likely directories come first, in optimal stat order.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_STAT_ORDER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
When this flag is specified, then the names will be returned in an order
|
||||
suitable for <literal>stat</literal>'ing each one. When planning to
|
||||
<function>stat</function> all files in the given directory, the
|
||||
returned order will likely be
|
||||
fastest.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_FOUND_UNKNOWN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--}}}-->
|
||||
|
||||
<!--{{{ EIO_DT_* -->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_UNKNOWN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Unknown node type(very common). Further <function>stat</function> needed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_FIFO</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
FIFO node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_CHR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_MPC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Multiplexed char device (v7+coherent) node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_DIR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Directory node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_NAM</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Xenix special named file node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_BLK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_MPB</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Multiplexed block device (v7+coherent)
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_REG</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_NWK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_CMP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
HP-UX network special node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_LNK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Link node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_SOCK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Socket node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_DOOR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Solaris door node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_WHT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_MAX</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Highest node type value
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<!--}}}-->
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Access modes for <function>eio_open</function> <parameter>flags</parameter>
|
||||
argument:
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_O_*-->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_RDONLY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_WRONLY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_RDWR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_NONBLOCK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_APPEND</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_CREAT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_TRUNC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_EXCL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_O_FSYNC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--}}}-->
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
<parameter>mode</parameter> argument flags for <function>eio_open</function>:
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_S_I*-->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IRUSR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IWUSR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IXUSR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IRGRP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IWGRP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IXGRP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IROTH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IWOTH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IXOTH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IFREG</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IFCHR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IFBLK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IFIFO</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_S_IFSOCK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--}}}-->
|
||||
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
<function>eio_sync_file_range</function> flags:
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_SYNC_FILE_*-->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_SYNC_FILE_RANGE_WAIT_BEFORE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_SYNC_FILE_RANGE_WRITE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_SYNC_FILE_RANGE_WAIT_AFTER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--}}}-->
|
||||
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
<function>eio_fallocate</function> flags:
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_FALLOC_FL_KEEP_SIZE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<note xmlns="http://docbook.org/ns/docbook">
|
||||
<para>
|
||||
<emphasis>EIO_S_I*</emphasis> constants have the same meaning as their
|
||||
<emphasis>S_I*</emphasis> POSIX counterparts.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<note xmlns="http://docbook.org/ns/docbook">
|
||||
<para>
|
||||
<emphasis>EIO_SYNC_FILE_*</emphasis> constants have the same meaning as their
|
||||
<emphasis>SYNC_FILE_**</emphasis> counterparts.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<note xmlns="http://docbook.org/ns/docbook">
|
||||
<para>
|
||||
<emphasis>EIO_O_*</emphasis> constants have the same meaning as their
|
||||
<emphasis>O_*</emphasis> POSIX counterparts.
|
||||
</para>
|
||||
</note>
|
||||
</appendix>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
55
reference/eio/entities.functions.xml
Normal file
55
reference/eio/entities.functions.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
&reference.eio.functions.eio-busy;
|
||||
&reference.eio.functions.eio-cancel;
|
||||
&reference.eio.functions.eio-chmod;
|
||||
&reference.eio.functions.eio-chown;
|
||||
&reference.eio.functions.eio-close;
|
||||
&reference.eio.functions.eio-custom;
|
||||
&reference.eio.functions.eio-dup2;
|
||||
&reference.eio.functions.eio-event-loop;
|
||||
&reference.eio.functions.eio-fallocate;
|
||||
&reference.eio.functions.eio-fchmod;
|
||||
&reference.eio.functions.eio-fchown;
|
||||
&reference.eio.functions.eio-fdatasync;
|
||||
&reference.eio.functions.eio-fstat;
|
||||
&reference.eio.functions.eio-fstatvfs;
|
||||
&reference.eio.functions.eio-fsync;
|
||||
&reference.eio.functions.eio-ftruncate;
|
||||
&reference.eio.functions.eio-futime;
|
||||
&reference.eio.functions.eio-grp-add;
|
||||
&reference.eio.functions.eio-grp-cancel;
|
||||
&reference.eio.functions.eio-grp-limit;
|
||||
&reference.eio.functions.eio-grp;
|
||||
&reference.eio.functions.eio-link;
|
||||
&reference.eio.functions.eio-lstat;
|
||||
&reference.eio.functions.eio-mkdir;
|
||||
&reference.eio.functions.eio-mknod;
|
||||
&reference.eio.functions.eio-nop;
|
||||
&reference.eio.functions.eio-npending;
|
||||
&reference.eio.functions.eio-nready;
|
||||
&reference.eio.functions.eio-nreqs;
|
||||
&reference.eio.functions.eio-nthreads;
|
||||
&reference.eio.functions.eio-open;
|
||||
&reference.eio.functions.eio-poll;
|
||||
&reference.eio.functions.eio-read;
|
||||
&reference.eio.functions.eio-readahead;
|
||||
&reference.eio.functions.eio-readdir;
|
||||
&reference.eio.functions.eio-readlink;
|
||||
&reference.eio.functions.eio-realpath;
|
||||
&reference.eio.functions.eio-rename;
|
||||
&reference.eio.functions.eio-rmdir;
|
||||
&reference.eio.functions.eio-sendfile;
|
||||
&reference.eio.functions.eio-set-max-idle;
|
||||
&reference.eio.functions.eio-set-max-parallel;
|
||||
&reference.eio.functions.eio-set-max-poll-reqs;
|
||||
&reference.eio.functions.eio-set-max-poll-time;
|
||||
&reference.eio.functions.eio-set-min-parallel;
|
||||
&reference.eio.functions.eio-stat;
|
||||
&reference.eio.functions.eio-statvfs;
|
||||
&reference.eio.functions.eio-symlink;
|
||||
&reference.eio.functions.eio-sync-file-range;
|
||||
&reference.eio.functions.eio-sync;
|
||||
&reference.eio.functions.eio-syncfs;
|
||||
&reference.eio.functions.eio-truncate;
|
||||
&reference.eio.functions.eio-unlink;
|
||||
&reference.eio.functions.eio-utime;
|
||||
&reference.eio.functions.eio-write;
|
||||
212
reference/eio/examples.xml
Normal file
212
reference/eio/examples.xml
Normal file
@@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="eio.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Cancelling a request</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Is called when eio_nop() finished */
|
||||
function my_nop_cb($data, $result) {
|
||||
echo "my_nop, ", $data, "\n";
|
||||
}
|
||||
|
||||
// This eio_nop() call will be cancelled
|
||||
$req = eio_nop(EIO_PRI_DEFAULT, "my_nop_cb", "1");
|
||||
var_dump($req);
|
||||
eio_cancel($req);
|
||||
|
||||
// This time eio_nop() will be processed
|
||||
eio_nop(EIO_PRI_DEFAULT, "my_nop_cb", "2");
|
||||
|
||||
// Process enqueued eio_* calls
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
resource(4) of type (EIO Request Descriptor)
|
||||
my_nop 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title>Calling <function>eio_chmod()</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$temp_filename = "eio-temp-file.tmp";
|
||||
touch($temp_filename);
|
||||
|
||||
/* Is called when eio_chmod() finished */
|
||||
function my_chmod_callback($data, $result) {
|
||||
global $temp_filename;
|
||||
|
||||
if ($result == 0 && !is_readable($temp_filename) && is_writable($temp_filename)) {
|
||||
echo "eio_chmod_ok";
|
||||
}
|
||||
|
||||
@unlink($temp_filename);
|
||||
}
|
||||
|
||||
eio_chmod($temp_filename, 0200, EIO_PRI_DEFAULT, "my_chmod_callback");
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
eio_chmod_ok
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title>Making a custom request</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Callback for the custom callback */
|
||||
function my_custom_callback($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump(count($result));
|
||||
var_dump($result['data_modified']);
|
||||
var_dump($result['result']);
|
||||
}
|
||||
|
||||
/* The custom request */
|
||||
function my_custom($data) {
|
||||
var_dump($data);
|
||||
|
||||
$result = array(
|
||||
'result' => 1001,
|
||||
'data_modified' => "my custom data",
|
||||
);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$data = "my_custom_data";
|
||||
$req = eio_custom("my_custom", EIO_PRI_DEFAULT, "my_custom_callback", $data);
|
||||
var_dump($req);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
resource(4) of type (EIO Request Descriptor)
|
||||
string(14) "my_custom_data"
|
||||
string(14) "my_custom_data"
|
||||
int(2)
|
||||
string(14) "my custom data"
|
||||
int(1001)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title>Grouping requests</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/*
|
||||
* Create a group request to open, read and close a file
|
||||
*/
|
||||
|
||||
$temp_filename = "eio-file.tmp";
|
||||
$fp = fopen($temp_filename, "w");
|
||||
fwrite($fp, "some data");
|
||||
fclose($fp);
|
||||
|
||||
/* Is called when the group requests are done */
|
||||
function my_grp_done($data, $result) {
|
||||
global $temp_filename;
|
||||
var_dump($result == 0);
|
||||
@unlink($temp_filename);
|
||||
}
|
||||
|
||||
/* Is called when eio_open() done */
|
||||
function my_grp_file_opened_callback($data, $result) {
|
||||
global $my_file_fd, $grp;
|
||||
|
||||
$my_file_fd = $result;
|
||||
|
||||
var_dump($result > 0);
|
||||
|
||||
// Enqueue eio_read()
|
||||
$req = eio_read($my_file_fd, 4, 0, EIO_PRI_DEFAULT, "my_grp_file_read_callback");
|
||||
eio_grp_add($grp, $req);
|
||||
}
|
||||
|
||||
/* Is called when eio_read() done */
|
||||
function my_grp_file_read_callback($data, $result) {
|
||||
global $my_file_fd, $grp;
|
||||
|
||||
var_dump($result);
|
||||
|
||||
$req = eio_close($my_file_fd);
|
||||
|
||||
// Enqueue eio_close()
|
||||
eio_grp_add($grp, $req);
|
||||
}
|
||||
|
||||
$grp = eio_grp("my_grp_done", "my_grp_data");
|
||||
|
||||
// Enqueue eio_open()
|
||||
$req = eio_open($temp_filename, EIO_O_RDWR | EIO_O_APPEND , NULL, 0, "my_grp_file_opened_callback", NULL);
|
||||
eio_grp_add($grp, $req);
|
||||
var_dump($grp);
|
||||
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
resource(6) of type (EIO Group Descriptor)
|
||||
bool(true)
|
||||
string(4) "some"
|
||||
bool(true)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
100
reference/eio/functions/eio-busy.xml
Normal file
100
reference/eio/functions/eio-busy.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-busy" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_busy</refname>
|
||||
<refpurpose>Artificially increase load. Could be useful in tests,
|
||||
benchmarking.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_busy</methodname>
|
||||
<methodparam><type>int</type><parameter>delay</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_busy</function> artificially increases load taking
|
||||
<parameter>delay</parameter> seconds to execute. May be used for debugging,
|
||||
or benchmarking.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>delay</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Delay in seconds
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pri</parameter></term>
|
||||
<listitem>
|
||||
&eio.request.pri.values;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This callback is called when all the group requests are done.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_busy</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso"> &reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_nop</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
|
||||
-->
|
||||
127
reference/eio/functions/eio-cancel.xml
Normal file
127
reference/eio/functions/eio-cancel.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-cancel" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_cancel</refname>
|
||||
<refpurpose>Cancels a request</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_cancel</methodname>
|
||||
<methodparam><type>resource</type><parameter>req</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_cancel</function> cancels a request specified by
|
||||
<parameter>req</parameter>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The request resource
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_cancel</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Is called when eio_nop() finished */
|
||||
function my_nop_cb($data, $result) {
|
||||
echo "my_nop, ", $data, "\n";
|
||||
}
|
||||
|
||||
// This eio_nop() call will be cancelled
|
||||
$req = eio_nop(EIO_PRI_DEFAULT, "my_nop_cb", "1");
|
||||
var_dump($req);
|
||||
eio_cancel($req);
|
||||
|
||||
// This time eio_nop() will be processed
|
||||
eio_nop(EIO_PRI_DEFAULT, "my_nop_cb", "2");
|
||||
|
||||
// Process enqueued eio_* calls
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
resource(4) of type (EIO Request Descriptor)
|
||||
my_nop 2
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_grp_cancel</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
|
||||
-->
|
||||
108
reference/eio/functions/eio-chmod.xml
Normal file
108
reference/eio/functions/eio-chmod.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-chmod" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_chmod</refname>
|
||||
<refpurpose>Change file/direcrory permissions.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_chmod</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_chmod</function> changes file, or direcrory permissions. The
|
||||
new permissions are specified by <parameter>mode</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path to the target file or directory
|
||||
&eio.warn.relpath;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new permissions. E.g. <constant>0644</constant>.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_chmod</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_chown</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
|
||||
-->
|
||||
117
reference/eio/functions/eio-chown.xml
Normal file
117
reference/eio/functions/eio-chown.xml
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-chown" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_chown</refname>
|
||||
<refpurpose>Change file/direcrory permissions.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_chown</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>uid</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>gid</parameter><initializer>-1</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>callback</parameter><initializer>NULL</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Changes file, or directory permissions.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path to file or directory.
|
||||
&eio.warn.relpath;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>uid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
User ID. Is ignored when equal to -1.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>gid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Group ID. Is ignored when equal to -1.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_chown</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_chown</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
|
||||
-->
|
||||
98
reference/eio/functions/eio-close.xml
Normal file
98
reference/eio/functions/eio-close.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-close" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_close</refname>
|
||||
<refpurpose>Close file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_close</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_close</function> closes file specified by
|
||||
<parameter>fd</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_close</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_open</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
|
||||
-->
|
||||
158
reference/eio/functions/eio-custom.xml
Normal file
158
reference/eio/functions/eio-custom.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-custom" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_custom</refname>
|
||||
<refpurpose>Execute custom request like any other <emphasis>eio_*</emphasis> call.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_custom</methodname>
|
||||
<methodparam><type>mixed</type><parameter>execute</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_custom</function> executes custom function specified by
|
||||
<parameter>execute</parameter> processing it just like any other <emphasis>eio_*</emphasis> call.
|
||||
</para>
|
||||
|
||||
<warning xmlns="http://docbook.org/ns/docbook"><simpara>May crash with
|
||||
<emphasis>xdebug</emphasis> extension. See issue
|
||||
<link xlink:href="http://bugs.xdebug.org/view.php?id=725">http://bugs.xdebug.org/view.php?id=725</link>
|
||||
</simpara></warning>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>execute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the request function that should match the following prototype:
|
||||
|
||||
<programlisting role="php"><![CDATA[
|
||||
mixed execute(mixed data);
|
||||
]]></programlisting>
|
||||
<parameter>callback</parameter> is event completion callback that should match the following
|
||||
prototype:
|
||||
<programlisting role="php"><![CDATA[
|
||||
void callback(mixed data, mixed result);
|
||||
]]></programlisting>
|
||||
|
||||
<parameter>data</parameter> is the data passed to
|
||||
<parameter>execute</parameter> via <parameter>data</parameter> argument
|
||||
without modifications
|
||||
<parameter>result</parameter> value returned by <parameter>execute</parameter>
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_custom</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_custom</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Callback for the custom callback */
|
||||
function my_custom_callback($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump(count($result));
|
||||
var_dump($result['data_modified']);
|
||||
var_dump($result['result']);
|
||||
}
|
||||
|
||||
/* The custom request */
|
||||
function my_custom($data) {
|
||||
var_dump($data);
|
||||
|
||||
$result = array(
|
||||
'result' => 1001,
|
||||
'data_modified' => "my custom data",
|
||||
);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$data = "my_custom_data";
|
||||
$req = eio_custom("my_custom", EIO_PRI_DEFAULT, "my_custom_callback", $data);
|
||||
var_dump($req);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
resource(4) of type (EIO Request Descriptor)
|
||||
string(14) "my_custom_data"
|
||||
string(14) "my_custom_data"
|
||||
int(2)
|
||||
string(14) "my custom data"
|
||||
int(1001)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
-->
|
||||
100
reference/eio/functions/eio-dup2.xml
Normal file
100
reference/eio/functions/eio-dup2.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-dup2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_dup2</refname>
|
||||
<refpurpose>Duplicate a file descriptor</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_dup2</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>fd2</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_dup2</function> duplicates file descriptor.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Source file descriptor
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>fd2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Target file descriptor
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_dup2</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
99
reference/eio/functions/eio-event-loop.xml
Normal file
99
reference/eio/functions/eio-event-loop.xml
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-event-loop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_event_loop</refname>
|
||||
<refpurpose>Polls libeio until all requests proceeded</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>eio_event_loop</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_event_loop</function> polls libeio until all requests proceeded.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_event_loop</function> returns &true; on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_event_loop()</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$temp_filename = "eio-temp-file.tmp";
|
||||
touch($temp_filename);
|
||||
|
||||
/* Is called when eio_chmod() finished */
|
||||
function my_chmod_callback($data, $result) {
|
||||
global $temp_filename;
|
||||
|
||||
if ($result == 0 && !is_readable($temp_filename) && is_writable($temp_filename)) {
|
||||
echo "eio_chmod_ok";
|
||||
}
|
||||
|
||||
@unlink($temp_filename);
|
||||
}
|
||||
|
||||
eio_chmod($temp_filename, 0200, EIO_PRI_DEFAULT, "my_chmod_callback");
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
eio_chmod_ok
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_poll</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
|
||||
-->
|
||||
132
reference/eio/functions/eio-fallocate.xml
Normal file
132
reference/eio/functions/eio-fallocate.xml
Normal file
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-fallocate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_fallocate</refname>
|
||||
<refpurpose>Allows the caller to directly manipulate the allocated disk
|
||||
space for a file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fallocate</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_fallocate</function> allows the caller to directly manipulate the allocated disk space for the
|
||||
file specified by <parameter>fd</parameter> file descriptor for the byte
|
||||
range starting at <parameter>offset</parameter> and continuing for
|
||||
<parameter>length</parameter> bytes.
|
||||
</para>
|
||||
|
||||
<note xmlns="http://docbook.org/ns/docbook">
|
||||
<title>File should be opened for writing</title>
|
||||
<para><constant>EIO_O_CREAT</constant> should be logically
|
||||
<emphasis>OR</emphasis>'d with <constant>EIO_O_WRONLY</constant>, or
|
||||
<constant>EIO_O_RDWR</constant>
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor, e.g. returned by <function>eio_open</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>Currently only one flag is supported for mode:
|
||||
<constant>EIO_FALLOC_FL_KEEP_SIZE</constant> (the same as POSIX constant
|
||||
<constant>FALLOC_FL_KEEP_SIZE</constant>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies start of the byte range.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies length the byte range.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_fallocate</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
107
reference/eio/functions/eio-fchmod.xml
Normal file
107
reference/eio/functions/eio-fchmod.xml
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-fchmod" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_fchmod</refname>
|
||||
<refpurpose>Change file permissions.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fchmod</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_fchmod</function> changes permissions for the file specified
|
||||
by <parameter>fd</parameter> file descriptor.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor, e.g. returned by <function>eio_open</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new permissions. E.g. 0644.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_fchmod</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_fchown</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
|
||||
-->
|
||||
109
reference/eio/functions/eio-fchown.xml
Normal file
109
reference/eio/functions/eio-fchown.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-fchown" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_fchown</refname>
|
||||
<refpurpose>Change file ownership</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fchown</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>uid</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>gid</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_fchown</function> changes ownership of the file specified by
|
||||
<parameter>fd</parameter> file descriptor.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>uid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
User ID. Is ignored when equal to -1.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>gid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Group ID. Is ignored when equal to -1.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_fchmod</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
|
||||
-->
|
||||
90
reference/eio/functions/eio-fdatasync.xml
Normal file
90
reference/eio/functions/eio-fdatasync.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<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>Synchronize a file's in-core state with storage device.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fdatasync</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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> synchronizes a file's in-core state with storage device.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor, e.g. returned by <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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_fdatasync</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
176
reference/eio/functions/eio-fstat.xml
Normal file
176
reference/eio/functions/eio-fstat.xml
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<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>Get file status</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fstat</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_fstat</function> returns file status information in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_busy</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_lstat</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Create temporary file
|
||||
$tmp_filename = "eio-file.tmp";
|
||||
touch($tmp_filename);
|
||||
|
||||
/* Is called when eio_fstat() done */
|
||||
function my_res_cb($data, $result) {
|
||||
// Should output array with stat info
|
||||
var_dump($result);
|
||||
|
||||
if ($data['fd']) {
|
||||
// Close temporary file
|
||||
eio_close($data['fd']);
|
||||
eio_event_loop();
|
||||
}
|
||||
// Remove temporary file
|
||||
@unlink($data['file']);
|
||||
}
|
||||
|
||||
/* Is called when eio_open() done */
|
||||
function my_open_cb($data, $result) {
|
||||
// Prepare data for callback
|
||||
$d = array(
|
||||
'fd' => $result,
|
||||
'file'=> $data
|
||||
);
|
||||
// Request stat info
|
||||
eio_fstat($result, EIO_PRI_DEFAULT, "my_res_cb", $d);
|
||||
// Process request(s)
|
||||
eio_event_loop();
|
||||
}
|
||||
|
||||
// Open temporary file
|
||||
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>eio_lstat</member>
|
||||
<member>eio_stat</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
|
||||
-->
|
||||
95
reference/eio/functions/eio-fstatvfs.xml
Normal file
95
reference/eio/functions/eio-fstatvfs.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<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>Get file system statistics</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fstatvfs</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_fstatvfs</function> returns file system statistics in
|
||||
<parameter>result</parameter> of <parameter>callback</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A file descriptor of a file within the mounted file system.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_fstatvfs</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_statvfs</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
|
||||
-->
|
||||
98
reference/eio/functions/eio-fsync.xml
Normal file
98
reference/eio/functions/eio-fsync.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-fsync" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_fsync</refname>
|
||||
<refpurpose>Synchronize a file's in-core state with storage device</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_fsync</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>callback</parameter><initializer>NULL</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Synchronize a file's in-core state with storage device
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_fsync</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_sync</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
|
||||
-->
|
||||
109
reference/eio/functions/eio-ftruncate.xml
Normal file
109
reference/eio/functions/eio-ftruncate.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-ftruncate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_ftruncate</refname>
|
||||
<refpurpose>Truncate a file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_ftruncate</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_ftruncate</function> causes a regular file referenced by
|
||||
<parameter>fd</parameter> file descriptor to be truncated to precisely
|
||||
<parameter>length</parameter> bytes.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Offset from beginning of the file
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_ftruncate</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_truncate</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
|
||||
-->
|
||||
113
reference/eio/functions/eio-futime.xml
Normal file
113
reference/eio/functions/eio-futime.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-futime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_futime</refname>
|
||||
<refpurpose>Change file last access and modification times</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>ReturnType</type><methodname>eio_futime</methodname>
|
||||
<methodparam><type>string</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>atime</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>mtime</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_futime</function> changes file last access and modification
|
||||
times.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor, e.g. returned by <function>eio_open</function>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>atime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Access time
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mtime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Modification time
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_futime</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_utime</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
|
||||
-->
|
||||
150
reference/eio/functions/eio-grp-add.xml
Normal file
150
reference/eio/functions/eio-grp-add.xml
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-grp-add" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_grp_add</refname>
|
||||
<refpurpose>Adds a request to the request group.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_grp_add</methodname>
|
||||
<methodparam><type>resource</type><parameter>grp</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>req</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_grp_add</function> adds a request to the request group.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>grp</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The request group resource returned by <function>eio_grp</function>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>req</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The request resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_grp_add</function> doesn't return a value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Grouping requests</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/*
|
||||
* Create a group request to open, read and close a file
|
||||
*/
|
||||
|
||||
$temp_filename = "eio-file.tmp";
|
||||
$fp = fopen($temp_filename, "w");
|
||||
fwrite($fp, "some data");
|
||||
fclose($fp);
|
||||
|
||||
/* Is called when the group requests are done */
|
||||
function my_grp_done($data, $result) {
|
||||
global $temp_filename;
|
||||
var_dump($result == 0);
|
||||
@unlink($temp_filename);
|
||||
}
|
||||
|
||||
/* Is called when eio_open() done */
|
||||
function my_grp_file_opened_callback($data, $result) {
|
||||
global $my_file_fd, $grp;
|
||||
|
||||
$my_file_fd = $result;
|
||||
|
||||
var_dump($result > 0);
|
||||
|
||||
// Enqueue eio_read()
|
||||
$req = eio_read($my_file_fd, 4, 0, EIO_PRI_DEFAULT, "my_grp_file_read_callback");
|
||||
eio_grp_add($grp, $req);
|
||||
}
|
||||
|
||||
/* Is called when eio_read() done */
|
||||
function my_grp_file_read_callback($data, $result) {
|
||||
global $my_file_fd, $grp;
|
||||
|
||||
var_dump($result);
|
||||
|
||||
$req = eio_close($my_file_fd);
|
||||
|
||||
// Enqueue eio_close()
|
||||
eio_grp_add($grp, $req);
|
||||
}
|
||||
|
||||
$grp = eio_grp("my_grp_done", "my_grp_data");
|
||||
|
||||
// Enqueue eio_open()
|
||||
$req = eio_open($temp_filename, EIO_O_RDWR | EIO_O_APPEND , NULL, 0, "my_grp_file_opened_callback", NULL);
|
||||
eio_grp_add($grp, $req);
|
||||
var_dump($grp);
|
||||
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]></programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen><![CDATA[
|
||||
resource(6) of type (EIO Group Descriptor)
|
||||
bool(true)
|
||||
string(4) "some"
|
||||
bool(true)
|
||||
]]></screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_grp</member>
|
||||
<member>eio_grp_cancel</member>
|
||||
<member>eio_grp_limit</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
|
||||
-->
|
||||
73
reference/eio/functions/eio-grp-cancel.xml
Normal file
73
reference/eio/functions/eio-grp-cancel.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-grp-cancel" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_grp_cancel</refname>
|
||||
<refpurpose>Cancels a request group</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_grp_cancel</methodname>
|
||||
<methodparam><type>resource</type><parameter>grp</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_grp_cancel</function> cancels a group request specified by
|
||||
<parameter>grp</parameter> request group resource.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>grp</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The request group resource returned by <function>eio_grp</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_grp</member>
|
||||
<member>eio_grp_add</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
|
||||
-->
|
||||
80
reference/eio/functions/eio-grp-limit.xml
Normal file
80
reference/eio/functions/eio-grp-limit.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-grp-limit" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_grp_limit</refname>
|
||||
<refpurpose>Set group limit</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_grp_limit</methodname>
|
||||
<methodparam><type>resource</type><parameter>grp</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>limit</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Limit number of requests in the request group.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>grp</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The request group resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>limit</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of requests in the group.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_grp_add</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
|
||||
-->
|
||||
147
reference/eio/functions/eio-grp.xml
Normal file
147
reference/eio/functions/eio-grp.xml
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-grp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_grp</refname>
|
||||
<refpurpose>Createsa request group.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_grp</methodname>
|
||||
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>string</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_grp</function> creates a request group.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
&eio.callback.proto;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_grp</function> returns request group resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_grp</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$temp_filename = "eio-file.tmp";
|
||||
$fp = fopen($temp_filename, "w");
|
||||
fwrite($fp, "some data");
|
||||
fclose($fp);
|
||||
$my_file_fd = NULL;
|
||||
|
||||
/* Is called when the group requests are done */
|
||||
function my_grp_done($data, $result) {
|
||||
// Remove the file, if it still exists
|
||||
@unlink($data);
|
||||
}
|
||||
|
||||
/* Is called when the temporary file is opened */
|
||||
function my_grp_file_opened_callback($data, $result) {
|
||||
global $my_file_fd, $grp;
|
||||
|
||||
$my_file_fd = $result;
|
||||
|
||||
$req = eio_read($my_file_fd, 4, 0,
|
||||
EIO_PRI_DEFAULT, "my_grp_file_read_callback");
|
||||
eio_grp_add($grp, $req);
|
||||
}
|
||||
|
||||
/* Is called when the file is read */
|
||||
function my_grp_file_read_callback($data, $result) {
|
||||
global $my_file_fd, $grp;
|
||||
|
||||
var_dump($result);
|
||||
|
||||
// Create request to close the file
|
||||
$req = eio_close($my_file_fd);
|
||||
|
||||
// Add request to the group
|
||||
eio_grp_add($grp, $req);
|
||||
}
|
||||
|
||||
// Create request group
|
||||
$grp = eio_grp("my_grp_done", $temp_filename);
|
||||
|
||||
// Create request
|
||||
$req = eio_open($temp_filename, EIO_O_RDWR | EIO_O_APPEND , NULL,
|
||||
EIO_PRI_DEFAULT, "my_grp_file_opened_callback", NULL);
|
||||
|
||||
// Add request to the group
|
||||
eio_grp_add($grp, $req);
|
||||
|
||||
// Process requests
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(4) "some"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_grp_cancel</member>
|
||||
<member>eio_grp_add</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
|
||||
-->
|
||||
163
reference/eio/functions/eio-link.xml
Normal file
163
reference/eio/functions/eio-link.xml
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-link" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_link</refname>
|
||||
<refpurpose>Create a hardlink for file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_link</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>new_path</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_link</function> creates a hardlink
|
||||
<parameter>new_path</parameter> for a file specified by
|
||||
<parameter>path</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Source file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>new_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Target file path.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_link</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$filename = dirname(__FILE__)."/symlink.dat";
|
||||
touch($filename);
|
||||
$link = dirname(__FILE__)."/symlink.link";
|
||||
$hardlink = dirname(__FILE__)."/hardlink.link";
|
||||
|
||||
function my_hardlink_cb($data, $result) {
|
||||
global $link, $filename;
|
||||
var_dump(file_exists($data) && !is_link($data));
|
||||
@unlink($data);
|
||||
|
||||
eio_symlink($filename, $link, EIO_PRI_DEFAULT, "my_symlink_cb", $link);
|
||||
}
|
||||
|
||||
function my_symlink_cb($data, $result) {
|
||||
global $link, $filename;
|
||||
var_dump(file_exists($data) && is_link($data));
|
||||
|
||||
if (!eio_readlink($data, EIO_PRI_DEFAULT, "my_readlink_cb", NULL)) {
|
||||
@unlink($link);
|
||||
@unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
function my_readlink_cb($data, $result) {
|
||||
global $filename, $link;
|
||||
var_dump($result);
|
||||
|
||||
@unlink($link);
|
||||
@unlink($filename);
|
||||
}
|
||||
|
||||
eio_link($filename, $hardlink, EIO_PRI_DEFAULT, "my_hardlink_cb", $hardlink);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(true)
|
||||
bool(true)
|
||||
string(%d) "%ssymlink.dat"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_symlink</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
|
||||
-->
|
||||
162
reference/eio/functions/eio-lstat.xml
Normal file
162
reference/eio/functions/eio-lstat.xml
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-lstat" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_lstat</refname>
|
||||
<refpurpose>Get file status</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_lstat</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_lstat</function> returns file status information in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file path
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_lstat</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_lstat</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tmp_filename = "eio-file.tmp";
|
||||
touch($tmp_filename);
|
||||
|
||||
function my_res_cb($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump($result);
|
||||
}
|
||||
|
||||
function my_open_cb($data, $result) {
|
||||
eio_close($result);
|
||||
eio_event_loop();
|
||||
|
||||
@unlink($data);
|
||||
}
|
||||
|
||||
eio_lstat($tmp_filename, EIO_PRI_DEFAULT, "my_res_cb", "eio_lstat");
|
||||
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[
|
||||
string(9) "eio_lstat"
|
||||
array(12) {
|
||||
["st_dev"]=>
|
||||
int(2050)
|
||||
["st_ino"]=>
|
||||
int(2099197)
|
||||
["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(1318235777)
|
||||
["st_mtime"]=>
|
||||
int(1318235777)
|
||||
["st_ctime"]=>
|
||||
int(1318235777)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_stat</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
|
||||
-->
|
||||
145
reference/eio/functions/eio-mkdir.xml
Normal file
145
reference/eio/functions/eio-mkdir.xml
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-mkdir" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_mkdir</refname>
|
||||
<refpurpose>Create directory</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_mkdir</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_mkdir</function> creates directory with specified access
|
||||
<parameter>mode</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path for the new directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Access mode, e.g. 0755
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_mkdir</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_mkdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$temp_dirname = "eio-temp-dir";
|
||||
|
||||
/* Is called when eio_mkdir() finishes */
|
||||
function my_mkdir_callback($data, $result) {
|
||||
if ($result == 0 && is_dir($temp_dirname)
|
||||
&& !is_readable($temp_dirname)
|
||||
&& is_writable($temp_dirname)) {
|
||||
echo "eio_mkdir_ok";
|
||||
}
|
||||
|
||||
// Remove directory
|
||||
if (file_exists($data))
|
||||
rmdir($temp_dirname);
|
||||
}
|
||||
|
||||
// Create directory with access mode 0300
|
||||
eio_mkdir($temp_dirname, 0300, EIO_PRI_DEFAULT, "my_mkdir_callback", $temp_dirname);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
eio_mkdir_ok
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_rmdir</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
|
||||
-->
|
||||
225
reference/eio/functions/eio-mknod.xml
Normal file
225
reference/eio/functions/eio-mknod.xml
Normal file
@@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-mknod" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_mknod</refname>
|
||||
<refpurpose>Create a special or ordinary file.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_mknod</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>dev</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_mknod</function> creates ordinary or special(often) file.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path for the new node(file).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies both the permissions to use and the type of node to be
|
||||
created. It should be a combination (using bitwise OR) of one of the
|
||||
file types listed below and the permissions for the new node(e.g. 0640).
|
||||
|
||||
Possible file types are: <constant>EIO_S_IFREG</constant>(regular file),
|
||||
<constant>EIO_S_IFCHR</constant>(character file),
|
||||
<constant>EIO_S_IFBLK</constant>(block special file),
|
||||
<constant>EIO_S_IFIFO</constant>(FIFO - named pipe) and
|
||||
<constant>EIO_S_IFSOCK</constant>(UNIX domain socket).
|
||||
|
||||
To specify permissions <emphasis>EIO_S_I*</emphasis> constants could be
|
||||
used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dev</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the file type is <constant>EIO_S_IFCHR</constant> or
|
||||
<constant>EIO_S_IFBLK</constant> then dev specifies the major and minor
|
||||
numbers of the newly created device special file. Otherwise
|
||||
<parameter>dev</parameter> ignored. See <emphasis>mknod(2) man page for
|
||||
details</emphasis>.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_mknod</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_mknod</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
|
||||
<?php
|
||||
// FIFO name
|
||||
$temp_filename = "/tmp/eio-temp-fifo";
|
||||
|
||||
/* Is called when eio_mknod() finishes */
|
||||
function my_mknod_callback($data, $result) {
|
||||
$s = stat($data);
|
||||
var_dump($s);
|
||||
|
||||
if ($result == 0) {
|
||||
echo "eio_mknod_ok";
|
||||
}
|
||||
|
||||
@unlink($data);
|
||||
}
|
||||
|
||||
eio_mknod($temp_filename, EIO_S_IFIFO, 0,
|
||||
EIO_PRI_DEFAULT, "my_mknod_callback", $temp_filename);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(26) {
|
||||
[0]=>
|
||||
int(17)
|
||||
[1]=>
|
||||
int(2337608)
|
||||
[2]=>
|
||||
int(4096)
|
||||
[3]=>
|
||||
int(1)
|
||||
[4]=>
|
||||
int(1000)
|
||||
[5]=>
|
||||
int(100)
|
||||
[6]=>
|
||||
int(0)
|
||||
[7]=>
|
||||
int(0)
|
||||
[8]=>
|
||||
int(1318241261)
|
||||
[9]=>
|
||||
int(1318241261)
|
||||
[10]=>
|
||||
int(1318241261)
|
||||
[11]=>
|
||||
int(4096)
|
||||
[12]=>
|
||||
int(0)
|
||||
["dev"]=>
|
||||
int(17)
|
||||
["ino"]=>
|
||||
int(2337608)
|
||||
["mode"]=>
|
||||
int(4096)
|
||||
["nlink"]=>
|
||||
int(1)
|
||||
["uid"]=>
|
||||
int(1000)
|
||||
["gid"]=>
|
||||
int(100)
|
||||
["rdev"]=>
|
||||
int(0)
|
||||
["size"]=>
|
||||
int(0)
|
||||
["atime"]=>
|
||||
int(1318241261)
|
||||
["mtime"]=>
|
||||
int(1318241261)
|
||||
["ctime"]=>
|
||||
int(1318241261)
|
||||
["blksize"]=>
|
||||
int(4096)
|
||||
["blocks"]=>
|
||||
int(0)
|
||||
}
|
||||
eio_mknod_ok
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_open</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
|
||||
-->
|
||||
90
reference/eio/functions/eio-nop.xml
Normal file
90
reference/eio/functions/eio-nop.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-nop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_nop</refname>
|
||||
<refpurpose>Does nothing, except go through the whole request cycle.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_nop</methodname>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_nop</function> does nothing, except go through the whole
|
||||
request cycle. Could be useful in debugging.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_nop</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_busy</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
|
||||
-->
|
||||
66
reference/eio/functions/eio-npending.xml
Normal file
66
reference/eio/functions/eio-npending.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-npending" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_npending</refname>
|
||||
<refpurpose>Returns number of finished, but unhandled requests</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>eio_npending</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_npending</function> returns number of finished, but unhandled requests
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_npending</function> returns number of finished, but unhandled
|
||||
requests.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_nreqs</member>
|
||||
<member>eio_nready</member>
|
||||
<member>eio_nthreads</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
|
||||
-->
|
||||
65
reference/eio/functions/eio-nready.xml
Normal file
65
reference/eio/functions/eio-nready.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-nready" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_nready</refname>
|
||||
<refpurpose>Returns number of not-yet handled requests</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>eio_nready</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_nready</function> returns number of not-yet handled requests
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_nreqs</member>
|
||||
<member>eio_nready</member>
|
||||
<member>eio_nthreads</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
|
||||
-->
|
||||
101
reference/eio/functions/eio-nreqs.xml
Normal file
101
reference/eio/functions/eio-nreqs.xml
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-nreqs" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_nreqs</refname>
|
||||
<refpurpose>Returns number of requests to be processed</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>ReturnType</type><methodname>eio_nreqs</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_nreqs</function> could be called in a custom loop calling
|
||||
<function>eio_poll</function>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_nreqs</function> returns number of requests to be processed.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_nreqs</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function res_cb($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump($result);
|
||||
}
|
||||
|
||||
eio_nop(EIO_PRI_DEFAULT, "res_cb", "1");
|
||||
eio_nop(EIO_PRI_DEFAULT, "res_cb", "2");
|
||||
eio_nop(EIO_PRI_DEFAULT, "res_cb", "3");
|
||||
|
||||
while (eio_nreqs()) {
|
||||
eio_poll();
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(1) "1"
|
||||
int(0)
|
||||
string(1) "3"
|
||||
int(0)
|
||||
string(1) "2"
|
||||
int(0)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_poll</member>
|
||||
<member>eio_nready</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
|
||||
-->
|
||||
66
reference/eio/functions/eio-nthreads.xml
Normal file
66
reference/eio/functions/eio-nthreads.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-nthreads" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_nthreads</refname>
|
||||
<refpurpose>Returns number of threads currently in use</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>eio_nthreads</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_nthreads</function> returns number of threads currently in
|
||||
use.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_npending</member>
|
||||
<member>eio_nready</member>
|
||||
<member>eio_nreqs</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
|
||||
-->
|
||||
170
reference/eio/functions/eio-open.xml
Normal file
170
reference/eio/functions/eio-open.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-open" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_open</refname>
|
||||
<refpurpose>Opens a file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_open</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_open</function> opens file specified by
|
||||
<parameter>path</parameter> in access mode <parameter>mode</parameter> with
|
||||
</para>
|
||||
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>One of <emphasis>EIO_O_*</emphasis> constants, or their
|
||||
combinations. <emphasis>EIO_O_*</emphasis> constants have the same
|
||||
meaning, as their corresponding <emphasis>O_*</emphasis> counterparts
|
||||
defined in <literal>fnctl.h</literal> C header file. Default is
|
||||
<constant>EIO_O_RDWR</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>One of <emphasis>EIO_S_I*</emphasis> constants, or their combination
|
||||
(via bitwise OR operator). The constants have the same meaning as their
|
||||
<emphasis>S_I*</emphasis> counterparts defined in <link
|
||||
xlink:href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html">sys/stat.h</link>
|
||||
C header file. Required, if a file is created. Otherwise ignored.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_open</function> returns file descriptor in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
on success; otherwise, <parameter>result</parameter> is equal to <constant>-1</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_open</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$temp_filename = "eio-temp-file.tmp";
|
||||
|
||||
/* Is called when eio_close() finishes */
|
||||
function my_close_cb($data, $result) {
|
||||
// Zero indicates success
|
||||
var_dump($result == 0);
|
||||
@unlink($data);
|
||||
}
|
||||
|
||||
/* Is called when eio_open() finishes */
|
||||
function my_file_opened_callback($data, $result) {
|
||||
// $result should contain the file descriptor
|
||||
var_dump($result > 0);
|
||||
|
||||
if ($result > 0) {
|
||||
// Close the file
|
||||
eio_close($result, EIO_PRI_DEFAULT, "my_close_cb", $data);
|
||||
eio_event_loop();
|
||||
}
|
||||
}
|
||||
|
||||
// Create new file for reading and writing
|
||||
// Deny group and others to do anything with that file
|
||||
eio_open($temp_filename, EIO_O_CREAT | EIO_O_RDWR, EIO_S_IRUSR | EIO_S_IWUSR,
|
||||
EIO_PRI_DEFAULT, "my_file_opened_callback", $temp_filename);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(true)
|
||||
bool(true)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_mknod</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
|
||||
-->
|
||||
103
reference/eio/functions/eio-poll.xml
Normal file
103
reference/eio/functions/eio-poll.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-poll" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_poll</refname>
|
||||
<refpurpose>Can be to be called whenever there are pending requests that need finishing.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>eio_poll</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_poll</function> can be used to implement special event loop.
|
||||
For this <function>eio_nreqs</function> could be used to test if there are
|
||||
unprocessed requests.
|
||||
</para>
|
||||
|
||||
<note><para>Applicable only when implementing userspace event loop.</para></note>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
If any request invocation returns a non-zero value, returns that value.
|
||||
Otherwise, it returns <constant>0</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_poll</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function res_cb($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump($result);
|
||||
}
|
||||
|
||||
eio_nop(EIO_PRI_DEFAULT, "res_cb", "1");
|
||||
eio_nop(EIO_PRI_DEFAULT, "res_cb", "2");
|
||||
eio_nop(EIO_PRI_DEFAULT, "res_cb", "3");
|
||||
|
||||
while (eio_nreqs()) {
|
||||
eio_poll();
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(1) "1"
|
||||
int(0)
|
||||
string(1) "3"
|
||||
int(0)
|
||||
string(1) "2"
|
||||
int(0)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_nreqs</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
|
||||
-->
|
||||
179
reference/eio/functions/eio-read.xml
Normal file
179
reference/eio/functions/eio-read.xml
Normal file
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-read" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_read</refname>
|
||||
<refpurpose>Read from a file descriptor at given offset.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_read</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_read</function> reads up to <parameter>length</parameter>
|
||||
bytes from <parameter>fd</parameter> file descriptor at
|
||||
<parameter>offset</parameter>. The read bytes are stored in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum number of bytes to read.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Offset within the file.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_read</function> stores read bytes in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
function.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_read</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Open a temporary file and write some bytes there
|
||||
$temp_filename = "eio-temp-file.tmp";
|
||||
$fp = fopen($temp_filename, "w");
|
||||
fwrite($fp, "1234567890");
|
||||
fclose($fp);
|
||||
|
||||
/* Is called when eio_read() is done */
|
||||
function my_read_cb($data, $result) {
|
||||
global $temp_filename;
|
||||
|
||||
// Output read bytes
|
||||
var_dump($result);
|
||||
|
||||
// Close file
|
||||
eio_close($data);
|
||||
eio_event_loop();
|
||||
|
||||
// Remove temporary file
|
||||
@unlink($temp_filename);
|
||||
}
|
||||
|
||||
/* Is called when eio_open() is done */
|
||||
function my_file_opened_callback($data, $result) {
|
||||
// $result should contain the file descriptor
|
||||
if ($result > 0) {
|
||||
// Read 5 bytes starting from third
|
||||
eio_read($result, 5, 2, EIO_PRI_DEFAULT, "my_read_cb", $result);
|
||||
eio_event_loop();
|
||||
} else {
|
||||
// eio_open() failed
|
||||
unlink($data);
|
||||
}
|
||||
}
|
||||
|
||||
// Open the file for reading and writing
|
||||
eio_open($temp_filename, EIO_O_RDWR, NULL,
|
||||
EIO_PRI_DEFAULT, "my_file_opened_callback", $temp_filename);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(5) "34567"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_open</member>
|
||||
<member>eio_write</member>
|
||||
<member>eio_close</member>
|
||||
<member>eio_event_loop</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
|
||||
-->
|
||||
109
reference/eio/functions/eio-readahead.xml
Normal file
109
reference/eio/functions/eio-readahead.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-readahead" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_readahead</refname>
|
||||
<refpurpose>Perform file readahead into page cache</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_readahead</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_readahead</function> populates the page cache with data from a file so that subsequent reads from
|
||||
that file will not block on disk I/O. See <literal>READAHEAD(2)</literal> man page for details.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Starting point from which data is to be read.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of bytes to be read.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_readahead</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
491
reference/eio/functions/eio-readdir.xml
Normal file
491
reference/eio/functions/eio-readdir.xml
Normal file
@@ -0,0 +1,491 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-readdir" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_readdir</refname>
|
||||
<refpurpose>Reads through a whole directory</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_readdir</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>string</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Reads through a whole directory(via the <literal>opendir</literal>, <literal>readdir</literal> and <literal>closedir</literal> system
|
||||
calls) and returns either the names or an array in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
function, depending on the <parameter>flags</parameter> argument.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Directory path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Combination of <emphasis>EIO_READDIR_*</emphasis> constants.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_readdir</function> returns request resource on success, or
|
||||
&false; on error. Sets <parameter>result</parameter> argument of
|
||||
<parameter>callback</parameter> function according to
|
||||
<parameter>flags</parameter>:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_READDIR_* -->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_DENTS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>eio_readdir</function> flag. If specified, the result argument of the callback
|
||||
becomes an array with the following keys:
|
||||
|
||||
<literal>'names'</literal> - array of directory names
|
||||
|
||||
<literal>'dents'</literal> - array of <literal>struct
|
||||
eio_dirent</literal>-like arrays having the following keys each:
|
||||
|
||||
<literal>'name'</literal> - the directory name;
|
||||
|
||||
<literal>'type'</literal> - one of <emphasis>EIO_DT_*</emphasis>
|
||||
constants;
|
||||
|
||||
<literal>'inode'</literal> - the inode number, if available, otherwise
|
||||
unspecified;
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_DIRS_FIRST</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
When this flag is specified, the names will be returned in an order
|
||||
where likely directories come first, in optimal stat order.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_STAT_ORDER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
When this flag is specified, then the names will be returned in an order
|
||||
suitable for <literal>stat</literal>'ing each one. When planning to
|
||||
<function>stat</function> all files in the given directory, the
|
||||
returned order will likely be
|
||||
fastest.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_READDIR_FOUND_UNKNOWN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--}}}-->
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>Node types:
|
||||
<variablelist>
|
||||
|
||||
<!--{{{ EIO_DT_* -->
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_UNKNOWN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Unknown node type(very common). Further <function>stat</function> needed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_FIFO</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
FIFO node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_CHR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_MPC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Multiplexed char device (v7+coherent) node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_DIR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Directory node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_NAM</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Xenix special named file node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_BLK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_MPB</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Multiplexed block device (v7+coherent)
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_REG</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_NWK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_CMP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
HP-UX network special node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_LNK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Link node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_SOCK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Socket node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_DOOR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Solaris door node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_WHT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Node type
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>EIO_DT_MAX</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Highest node type value
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<!--}}}-->
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_readdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Is called when eio_readdir() finishes */
|
||||
function my_readdir_callback($data, $result) {
|
||||
echo __FUNCTION__, " called\n";
|
||||
echo "data: "; var_dump($data);
|
||||
echo "result: "; var_dump($result);
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
eio_readdir("/var/spool/news", EIO_READDIR_STAT_ORDER | EIO_READDIR_DIRS_FIRST,
|
||||
EIO_PRI_DEFAULT, "my_readdir_callback");
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
my_readdir_callback called
|
||||
data: NULL
|
||||
result: array(2) {
|
||||
["names"]=>
|
||||
array(7) {
|
||||
[0]=>
|
||||
string(7) "archive"
|
||||
[1]=>
|
||||
string(8) "articles"
|
||||
[2]=>
|
||||
string(8) "incoming"
|
||||
[3]=>
|
||||
string(7) "innfeed"
|
||||
[4]=>
|
||||
string(8) "outgoing"
|
||||
[5]=>
|
||||
string(8) "overview"
|
||||
[6]=>
|
||||
string(3) "tmp"
|
||||
}
|
||||
["dents"]=>
|
||||
array(7) {
|
||||
[0]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(7)
|
||||
"archive"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393265)
|
||||
}
|
||||
[1]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(8)
|
||||
"articles"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393266)
|
||||
}
|
||||
[2]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(8)
|
||||
"incoming"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393267)
|
||||
}
|
||||
[3]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(7)
|
||||
"innfeed"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393269)
|
||||
}
|
||||
[4]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(8)
|
||||
"outgoing"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393270)
|
||||
}
|
||||
[5]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(8)
|
||||
"overview"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393271)
|
||||
}
|
||||
[6]=>
|
||||
array(3)
|
||||
{
|
||||
["name"]=>
|
||||
string(3)
|
||||
"tmp"
|
||||
["type"]=>
|
||||
int(4)
|
||||
["inode"]=>
|
||||
int(393272)
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
-->
|
||||
150
reference/eio/functions/eio-readlink.xml
Normal file
150
reference/eio/functions/eio-readlink.xml
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-readlink" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_readlink</refname>
|
||||
<refpurpose>Read value of a symbolic link.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_readlink</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>string</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Source symbolic link path
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_readlink</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_readlink</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$filename = dirname(__FILE__)."/symlink.dat";
|
||||
touch($filename);
|
||||
$link = dirname(__FILE__)."/symlink.link";
|
||||
$hardlink = dirname(__FILE__)."/hardlink.link";
|
||||
|
||||
function my_hardlink_cb($data, $result) {
|
||||
global $link, $filename;
|
||||
var_dump(file_exists($data) && !is_link($data));
|
||||
@unlink($data);
|
||||
|
||||
eio_symlink($filename, $link, EIO_PRI_DEFAULT, "my_symlink_cb", $link);
|
||||
}
|
||||
|
||||
function my_symlink_cb($data, $result) {
|
||||
global $link, $filename;
|
||||
var_dump(file_exists($data) && is_link($data));
|
||||
|
||||
if (!eio_readlink($data, EIO_PRI_DEFAULT, "my_readlink_cb", NULL)) {
|
||||
@unlink($link);
|
||||
@unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
function my_readlink_cb($data, $result) {
|
||||
global $filename, $link;
|
||||
var_dump($result);
|
||||
|
||||
@unlink($link);
|
||||
@unlink($filename);
|
||||
}
|
||||
|
||||
eio_link($filename, $hardlink, EIO_PRI_DEFAULT, "my_hardlink_cb", $hardlink);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(true)
|
||||
bool(true)
|
||||
string(16) "/tmp/symlink.dat"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_symlink</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
|
||||
-->
|
||||
123
reference/eio/functions/eio-realpath.xml
Normal file
123
reference/eio/functions/eio-realpath.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-realpath" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_realpath</refname>
|
||||
<refpurpose>Get the canonicalized absolute pathname.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_realpath</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>string</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_realpath</function> returns the canonicalized absolute
|
||||
pathname in <parameter>result</parameter> argument of
|
||||
<parameter>callback</parameter> function.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Short pathname
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pri</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_realpath</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
var_dump(getcwd());
|
||||
|
||||
function my_realpath_allback($data, $result) {
|
||||
var_dump($result);
|
||||
}
|
||||
|
||||
eio_realpath("../", EIO_PRI_DEFAULT, "my_realpath_allback");
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(12) "/home/ruslan"
|
||||
string(5) "/home"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
-->
|
||||
136
reference/eio/functions/eio-rename.xml
Normal file
136
reference/eio/functions/eio-rename.xml
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-rename" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_rename</refname>
|
||||
<refpurpose>Change the name or location of a file.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_rename</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>new_path</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_rename</function> renames or moves a file to new location.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Source path
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>new_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Target path
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_rename</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_rename</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
<?php
|
||||
$filename = dirname(__FILE__)."/eio-temp-file.dat";
|
||||
touch($filename);
|
||||
$new_filename = dirname(__FILE__)."/eio-temp-file-new.dat";
|
||||
|
||||
function my_rename_cb($data, $result) {
|
||||
global $filename, $new_filename;
|
||||
|
||||
if ($result == 0 && !file_exists($filename) && file_exists($new_filename)) {
|
||||
@unlink($new_filename);
|
||||
echo "eio_rename_ok";
|
||||
} else {
|
||||
@unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
eio_rename($filename, $new_filename, EIO_PRI_DEFAULT, "my_rename_cb", $filename);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
eio_rename_ok
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
-->
|
||||
131
reference/eio/functions/eio-rmdir.xml
Normal file
131
reference/eio/functions/eio-rmdir.xml
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-rmdir" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_rmdir</refname>
|
||||
<refpurpose>Remove a directory</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>ReturnType</type><methodname>eio_rmdir</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_rmdir</function> removes a directory.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Directory path
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_rmdir</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_rmdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$temp_dirname = "eio-temp-dir";
|
||||
mkdir($temp_dirname);
|
||||
|
||||
function my_rmdir_callback($data, $result) {
|
||||
if ($result == 0 && !file_exists($data)) {
|
||||
echo "eio_rmdir_ok";
|
||||
} else if (file_exists($data)) {
|
||||
rmdir($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
eio_rmdir($temp_dirname, EIO_PRI_DEFAULT, "my_rmdir_callback", $temp_dirname);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
eio_rmdir_ok
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_mkdir</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
|
||||
-->
|
||||
115
reference/eio/functions/eio-sendfile.xml
Normal file
115
reference/eio/functions/eio-sendfile.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-sendfile" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_sendfile</refname>
|
||||
<refpurpose>Transfer data between file descriptors</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>ReturnType</type><methodname>eio_sendfile</methodname>
|
||||
<methodparam><type>string</type><parameter>out_fd</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>in_fd</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>length</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_sendfile</function> copies data between one file descriptor
|
||||
and another. See <literal>SENDFILE(2)</literal> man page for details.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>out_fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Output file descriptor. Should be opened for writing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>in_fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Input file descriptor. Should be opened for reading.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Offset within the source file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of bytes to copy.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_sendfile</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
72
reference/eio/functions/eio-set-max-idle.xml
Normal file
72
reference/eio/functions/eio-set-max-idle.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-set-max-idle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_set_max_idle</refname>
|
||||
<refpurpose>Set maximum number of idle threads.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_set_max_idle</methodname>
|
||||
<methodparam><type>int</type><parameter>nthreads</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>nthreads</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of idle threads.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_set_min_parallel</member>
|
||||
<member>eio_set_max_parallel</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
|
||||
-->
|
||||
71
reference/eio/functions/eio-set-max-parallel.xml
Normal file
71
reference/eio/functions/eio-set-max-parallel.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-set-max-parallel" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_set_max_parallel</refname>
|
||||
<refpurpose>Set maximum parallel threads</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_set_max_parallel</methodname>
|
||||
<methodparam><type>int</type><parameter>nthreads</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>nthreads</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of parallel threads
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_set_min_parallel</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
|
||||
-->
|
||||
64
reference/eio/functions/eio-set-max-poll-reqs.xml
Normal file
64
reference/eio/functions/eio-set-max-poll-reqs.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-set-max-poll-reqs" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_set_max_poll_reqs</refname>
|
||||
<refpurpose>Set maximum number of requests processed in a poll.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_set_max_poll_reqs</methodname>
|
||||
<methodparam><type>int</type><parameter>nreqs</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>nreqs</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of requests
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</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
|
||||
-->
|
||||
65
reference/eio/functions/eio-set-max-poll-time.xml
Normal file
65
reference/eio/functions/eio-set-max-poll-time.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-set-max-poll-time" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_set_max_poll_time</refname>
|
||||
<refpurpose>Set maximum poll time</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_set_max_poll_time</methodname>
|
||||
<methodparam><type>double</type><parameter>nseconds</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Polling stops, if poll took longer than <parameter>nseconds</parameter>
|
||||
seconds.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>nseconds</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of seconds
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</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
|
||||
-->
|
||||
72
reference/eio/functions/eio-set-min-parallel.xml
Normal file
72
reference/eio/functions/eio-set-min-parallel.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-set-min-parallel" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_set_min_parallel</refname>
|
||||
<refpurpose>Set minimum parallel thread number</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>eio_set_min_parallel</methodname>
|
||||
<methodparam><type>string</type><parameter>nthreads</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>nthreads</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of parallel threads.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_set_max_parallel</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
|
||||
-->
|
||||
164
reference/eio/functions/eio-stat.xml
Normal file
164
reference/eio/functions/eio-stat.xml
Normal file
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<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>Get file status</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>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_stat</function> returns file status information in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file path
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_stat</function> returns request resource on success or
|
||||
&false; on error. On success assigns <parameter>result</parameter> argument of
|
||||
<parameter>callback</parameter> to an array.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_stat</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tmp_filename = "eio-file.tmp";
|
||||
touch($tmp_filename);
|
||||
|
||||
function my_res_cb($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump($result);
|
||||
}
|
||||
|
||||
function my_open_cb($data, $result) {
|
||||
eio_close($result);
|
||||
eio_event_loop();
|
||||
|
||||
@unlink($data);
|
||||
}
|
||||
|
||||
eio_stat($tmp_filename, EIO_PRI_DEFAULT, "my_res_cb", "eio_stat");
|
||||
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[
|
||||
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
|
||||
-->
|
||||
145
reference/eio/functions/eio-statvfs.xml
Normal file
145
reference/eio/functions/eio-statvfs.xml
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-statvfs" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_statvfs</refname>
|
||||
<refpurpose>Get file system statistics</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_statvfs</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pri</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>eio_statvfs</function> returns file system statistics information in
|
||||
<parameter>result</parameter> argument of <parameter>callback</parameter>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Pathname of any file within the mounted file system
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_statvfs</function> returns request resource on success or
|
||||
&false; on error. On success assigns <parameter>result</parameter> argument of
|
||||
<parameter>callback</parameter> to an array.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_statvfs</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tmp_filename = '/tmp/eio-file.tmp';
|
||||
touch($tmp_filename);
|
||||
|
||||
function my_statvfs_callback($data, $result) {
|
||||
var_dump($data);
|
||||
var_dump($result);
|
||||
|
||||
@unlink($data);
|
||||
}
|
||||
|
||||
eio_statvfs($tmp_filename, EIO_PRI_DEFAULT, "my_statvfs_callback", $tmp_filename);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(17) "/tmp/eio-file.tmp"
|
||||
array(11) {
|
||||
["f_bsize"]=>
|
||||
int(4096)
|
||||
["f_frsize"]=>
|
||||
int(4096)
|
||||
["f_blocks"]=>
|
||||
int(262144)
|
||||
["f_bfree"]=>
|
||||
int(262111)
|
||||
["f_bavail"]=>
|
||||
int(262111)
|
||||
["f_files"]=>
|
||||
int(1540815)
|
||||
["f_ffree"]=>
|
||||
int(1540743)
|
||||
["f_favail"]=>
|
||||
int(1540743)
|
||||
["f_fsid"]=>
|
||||
int(0)
|
||||
["f_flag"]=>
|
||||
int(4102)
|
||||
["f_namemax"]=>
|
||||
int(255)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
-->
|
||||
153
reference/eio/functions/eio-symlink.xml
Normal file
153
reference/eio/functions/eio-symlink.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-symlink" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_symlink</refname>
|
||||
<refpurpose>Create a symbolic link</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>ReturnType</type><methodname>eio_symlink</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>new_path</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_symlink</function> creates a symbolic link
|
||||
<parameter>new_path</parameter> to <parameter>path</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Source path
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>new_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Target path
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_symlink</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>eio_symlink</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$filename = dirname(__FILE__)."/symlink.dat";
|
||||
touch($filename);
|
||||
$link = dirname(__FILE__)."/symlink.link";
|
||||
|
||||
function my_symlink_cb($data, $result) {
|
||||
global $link, $filename;
|
||||
var_dump(file_exists($data) && is_link($data));
|
||||
|
||||
if (!eio_readlink($data, EIO_PRI_DEFAULT, "my_readlink_cb", NULL)) {
|
||||
@unlink($link);
|
||||
@unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
function my_readlink_cb($data, $result) {
|
||||
global $filename, $link;
|
||||
var_dump($result);
|
||||
|
||||
@unlink($link);
|
||||
@unlink($filename);
|
||||
}
|
||||
|
||||
eio_symlink($filename, $link, EIO_PRI_DEFAULT, "my_symlink_cb", $link);
|
||||
eio_event_loop();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(true)
|
||||
string(16) "/tmp/symlink.dat"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_link</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
|
||||
-->
|
||||
125
reference/eio/functions/eio-sync-file-range.xml
Normal file
125
reference/eio/functions/eio-sync-file-range.xml
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-sync-file-range" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_sync_file_range</refname>
|
||||
<refpurpose>Sync a file segment with disk</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_sync_file_range</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>nbytes</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_sync_file_range</function> permits fine control when synchronizing the open file referred to by the file
|
||||
descriptor <parameter>fd</parameter> with disk.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
File descriptor
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The starting byte of the file range to be synchronized
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>nbytes</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the length of the range to be synchronized, in bytes. If
|
||||
<parameter>nbytes</parameter> is zero, then all bytes from <parameter>offset</parameter> through
|
||||
to the end of file are synchronized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A bit-mask. Can include any of the following values:
|
||||
<constant>EIO_SYNC_FILE_RANGE_WAIT_BEFORE</constant>,
|
||||
<constant>EIO_SYNC_FILE_RANGE_WRITE</constant>,
|
||||
<constant>EIO_SYNC_FILE_RANGE_WAIT_AFTER</constant>. These flags have
|
||||
the same meaning as their <emphasis>SYNC_FILE_RANGE_*</emphasis>
|
||||
counterparts(see <literal>SYNC_FILE_RANGE(2)</literal> man page).
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_sync_file_range</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
55
reference/eio/functions/eio-sync.xml
Normal file
55
reference/eio/functions/eio-sync.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-sync" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_sync</refname>
|
||||
<refpurpose>Commit buffer cache to disk</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_sync</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_sync</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
92
reference/eio/functions/eio-syncfs.xml
Normal file
92
reference/eio/functions/eio-syncfs.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-syncfs" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_syncfs</refname>
|
||||
<refpurpose>Calls Linux' syncfs syscall, if available</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_syncfs</methodname>
|
||||
<methodparam><type>string</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>callback</parameter><initializer>NULL</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
File descriptor
|
||||
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_syncfs</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
107
reference/eio/functions/eio-truncate.xml
Normal file
107
reference/eio/functions/eio-truncate.xml
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-truncate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_truncate</refname>
|
||||
<refpurpose>Truncate a file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_truncate</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_truncate</function> causes the regular file named by <parameter>path</parameter> to be truncated to
|
||||
a size of precisely <parameter>length</parameter> bytes
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
File path
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Offset from beginning of the file.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_busy</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_ftruncate</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
|
||||
-->
|
||||
90
reference/eio/functions/eio-unlink.xml
Normal file
90
reference/eio/functions/eio-unlink.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-unlink" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_unlink</refname>
|
||||
<refpurpose>Delete a name and possibly the file it refers to</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>ReturnType</type><methodname>eio_unlink</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_unlink</function> deletes a name from the file system.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path to file
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_unlink</function> returns request resource on success or &false; on error.
|
||||
</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
|
||||
-->
|
||||
115
reference/eio/functions/eio-utime.xml
Normal file
115
reference/eio/functions/eio-utime.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-utime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_utime</refname>
|
||||
<refpurpose>Change file last access and modification times.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_utime</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>atime</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mtime</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>callback</parameter><initializer>NULL</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path to the file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>atime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Access time
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mtime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Modification time
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_utime</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_futime</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
|
||||
-->
|
||||
126
reference/eio/functions/eio-write.xml
Normal file
126
reference/eio/functions/eio-write.xml
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.eio-write" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>eio_write</refname>
|
||||
<refpurpose>Write to file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>eio_write</methodname>
|
||||
<methodparam><type>int</type><parameter>fd</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter role="reference">str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>int</type><parameter>pri</parameter><initializer>EIO_PRI_DEFAULT</initializer></methodparam>
|
||||
<methodparam
|
||||
choice="opt"><type>mixed</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_write</function> writes up to <parameter>length</parameter>
|
||||
bytes from <parameter>str</parameter> at <parameter>offset</parameter>
|
||||
offset from the beginning of the file.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file descriptor, e.g. returned by <function>eio_open</function>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Source string
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum number of bytes to write.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Offset from the beginning of file.
|
||||
</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>
|
||||
Arbitrary variable passed to <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>eio_write</function> returns request resource on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member>eio_open</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
|
||||
-->
|
||||
27
reference/eio/ini.xml
Normal file
27
reference/eio/ini.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 297028 $ -->
|
||||
<section xml:id="eio.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
30
reference/eio/reference.xml
Normal file
30
reference/eio/reference.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<reference xml:id="ref.eio" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Eio &Functions;</title>
|
||||
|
||||
&reference.eio.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
74
reference/eio/setup.xml
Normal file
74
reference/eio/setup.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="eio.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="eio.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
This extension requires <link xlink:href="&url.eio.libeio;">libeio</link>
|
||||
library. The following installs libeio:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
$ touch ~/.cvspass
|
||||
$ cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co libeio
|
||||
$ cd libeio
|
||||
$ ./autogen.sh
|
||||
$ ./configure
|
||||
$ make
|
||||
# make install
|
||||
]]>
|
||||
</screen>
|
||||
Note, the last command needs root priveleges.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!--{{{ Installation -->
|
||||
<section xml:id="eio.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;eio">&url.pecl.package;eio</link>.
|
||||
</para>
|
||||
</section>
|
||||
<!--}}}-->
|
||||
|
||||
<!--{{{ Configuration-->
|
||||
<section xml:id="eio.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
<!--}}}-->
|
||||
|
||||
<!--{{{ Resources -->
|
||||
<section xml:id="eio.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
There are two resource types in this extension: request and request group.
|
||||
</para>
|
||||
</section>
|
||||
<!--}}}-->
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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 fdm=marker
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
85
reference/eio/versions.xml
Normal file
85
reference/eio/versions.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!--
|
||||
Do NOT translate this file
|
||||
-->
|
||||
|
||||
<versions>
|
||||
<!-- Functions -->
|
||||
<function name='eio_poll' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_event_loop' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_open' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_truncate' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_chown' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_chmod' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_mkdir' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_rmdir' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_unlink' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_utime' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_mknod' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_link' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_symlink' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_rename' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_close' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_sync' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fsync' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fdatasync' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_futime' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_ftruncate' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fchmod' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fchown' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_dup2' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_read' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_write' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_readlink' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_realpath' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_stat' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_lstat' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fstat' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_statvfs' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fstatvfs' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_readdir' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_sendfile' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_readahead' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_syncfs' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_sync_file_range' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_fallocate' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_custom' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_busy' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_nop' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_cancel' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_grp' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_grp_add' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_grp_cancel' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_grp_limit' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_set_max_poll_time' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_set_max_poll_reqs' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_set_min_parallel' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_set_max_parallel' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_set_max_idle' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_nthreads' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_nreqs' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_nready' from='PECL eio >= 0.0.1dev'/>
|
||||
<function name='eio_npending' from='PECL eio >= 0.0.1dev'/>
|
||||
</versions>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
Reference in New Issue
Block a user