Initial addition to CVS...

- hasn't been added to the manual.xml.in
  file
- function names are still old versions
  before lib change from zzip to zip.
- no function examples yet


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@48885 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Beckham 2001-05-30 16:38:18 +00:00
parent 2e13a4e42f
commit bb42f2b2f2

286
functions/zip.xml Normal file
View file

@ -0,0 +1,286 @@
<reference id="ref.zip">
<title>Zip File Functions (Read Only Access)</title>
<titleabbrev>Zip</titleabbrev>
<partintro>
<para>
This module uses the functions of the <ulink
url="&url.zziplib;">ZZIPlib</ulink> library by Guido Draheim to
transparently read ZIP compressed archives and the files
inside them.
</para>
<para>
Please note that ZZIPlib only provides a subset of functions
provided in a full implementation of the ZIP compression algorithm
and can only read ZIP file archives. A normal ZIP utility is
needed to create the ZIP file archives read by this library.
</para>
<para>
Zip support in PHP is not enabled by default. You will need to
use the <link
linkend="install.configure.with-zip">--with-zip</link>
configuration option when compiling PHP to enable zip
support. This module requires ZZIPlib version &gt;= 0.10.6.
</para>
<sect1 id="zip-example">
<title>Example Usage</title>
<para>
This example opens a ZIP file archive, reads each file in the
archive and prints out its contents. The
<filename>test2.php</filename> archive used in this example is
one of the test archives in the ZZIPlib source distribution.
</para>
<example>
<title>Zip Usage Example</title>
<programlisting role="php">
&lt;?PHP
?&gt;
</programlisting>
</example>
</sect1>
</partintro>
<refentry id="function.zzip-close">
<refnamediv>
<refname>zzip_close</refname>
<refpurpose>Close a ZZip Entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>zzip_close</function></funcdef>
<paramdef>resource <parameter>zzip_entry</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Closes a directory entry specified by
<parameter>zzip_entry</parameter>. The parameter
<parameter>zzip_entry</parameter> must be a valid directory entry
opened by <function>zzip_open</function>.
</para>
<para>
This function has no return value.
</para>
<para>
See also <function>zzip_open</function> and
<function>zzip_read</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-closedir">
<refnamediv>
<refname>zzip_closedir</refname>
<refpurpose>Close a ZIP File Archive</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>zzip_closedir</function></funcdef>
<paramdef>resource <parameter>zzip</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Closes a zip file archive. The parameter
<parameter>zzip</parameter> must be a zip archive previously
opened by <function>zzip_opendir</function>.
</para>
<para>
This function has no return value.
</para>
<para>
See also <function>zzip_opendir</function> and
<function>zzip_readdir</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-entry-compressedsize">
<refnamediv>
<refname>zzip_entry_compressedsize</refname>
<refpurpose>Retrive the Compressed Size of a ZZIP Entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>zzip_entry_compressedsize</function></funcdef>
<paramdef>resource <parameter>zzip_entry</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns the compressed size of the directory entry specified by
<parameter>zzip_entry</parameter>. The parameter
<parameter>zzip_entry</parameter> is a valid directory entry
returned by <function>zzip_readdir</function>.
</para>
<para>
See also <function>zzip_opendir</function> and
<function>zzip_readdir</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-entry-compressionmethod">
<refnamediv>
<refname>zzip_entry_compressionmethod</refname>
<refpurpose>Retrive the Compression Method of a ZZIP Entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>zzip_entry_compressionmethod</function></funcdef>
<paramdef>resource <parameter>zzip_entry</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns the compression method of the directory entry specified by
<parameter>zzip_entry</parameter>. The parameter
<parameter>zzip_entry</parameter> is a valid directory entry
returned by <function>zzip_readdir</function>.
</para>
<para>
See also <function>zzip_opendir</function> and
<function>zzip_readdir</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-entry-filesize">
<refnamediv>
<refname>zzip_entry_filesize</refname>
<refpurpose>Retrive the Actual File Size of a ZZIP Entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>zzip_entry_filesize</function></funcdef>
<paramdef>resource <parameter>zzip_entry</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns the actual size of the directory entry specified by
<parameter>zzip_entry</parameter>. The parameter
<parameter>zzip_entry</parameter> is a valid directory entry
returned by <function>zzip_readdir</function>.
</para>
<para>
See also <function>zzip_opendir</function> and
<function>zzip_readdir</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-entry-name">
<refnamediv>
<refname>zzip_entry_name</refname>
<refpurpose>Retrive the Name of a ZZIP Entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>zzip_entry_name</function></funcdef>
<paramdef>resource <parameter>zzip_entry</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns the name of the directory entry specified by
<parameter>zzip_entry</parameter>. The parameter
<parameter>zzip_entry</parameter> is a valid directory entry
returned by <function>zzip_readdir</function>.
</para>
<para>
See also <function>zzip_opendir</function> and
<function>zzip_readdir</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-opendir">
<refnamediv>
<refname>zzip_opendir</refname>
<refpurpose>Open a ZIP File Archive</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>resource <function>zzip_opendir</function></funcdef>
<paramdef>string <parameter>filename</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Opens a new zip archive for reading. The
<parameter>filename</parameter> parameter is the filename of the
zip archive to open.
</para>
<para>
Returns a resource handle for later use with
<function>zzip_readdir</function> and
<function>zzip_closedir</function> or returns
<literal>false</literal> if <parameter>filename</parameter> does
not exist.
</para>
<para>
See also <function>zzip_readdir</function> and
<function>zzip_closedir</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.zzip-readdir">
<refnamediv>
<refname>zzip_readdir</refname>
<refpurpose>Reads Next Entry in a ZIP File Archive</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>resource <function>zzip_readdir</function></funcdef>
<paramdef>resource <parameter>zzip</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Reads the next entry in a zip file archive. The parameter
<parameter>zzip</parameter> must be a zip archive previously
opened by <function>zzip_opendir</function>.
</para>
<para>
Returns a directory entry resource for later use with
<function>zzip_open</function>, <function>zzip_read</function> and
the <function>zzip_entry_...</function> functions.
</para>
<para>
See also <function>zzip_opendir</function>,
<function>zzip_closedir</function>,
<function>zzip_open</function> and <function>zzip_read</function>.
</para>
</refsect1>
</refentry>
</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
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->