1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

changes in zip 1.22.2 (and libzip 1.10.1)

This commit is contained in:
Remi Collet
2023-08-25 06:47:24 +02:00
parent 3d522c890d
commit bbf1e8a3e5
3 changed files with 48 additions and 4 deletions

View File

@@ -934,6 +934,32 @@
</varlistentry>
</variablelist>
<variablelist xml:id="ziparchive.constants.length">
<title>Length parameter constants</title>
<varlistentry xml:id="ziparchive.constants.length-to-end">
<term>
<constant>ZipArchive::LENGTH_TO_END</constant>
</term>
<listitem>
<simpara>
Use file size, if the file grows additionnal data is ignored, if the file shrinks an error is raised (<constant>ZipArchive::ER_DATA_LENGTH</constant>).
Available as of PHP 8.3.0 and PECL zip 1.22.2.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ziparchive.constants.length-unchecked">
<term>
<constant>ZipArchive::LENGTH_UNCHECKED</constant>
</term>
<listitem>
<simpara>
Use all available data.
Available as of PHP 8.3.0 and PECL zip 1.22.2, if built against libzip ≥ 1.10.1.
</simpara>
</listitem>
</varlistentry>
</variablelist>
<variablelist xml:id="ziparchive.constants.other">
<title>Other constants</title>
<varlistentry xml:id="ziparchive.constants.libzip-version">

View File

@@ -12,7 +12,7 @@
<methodparam><type>string</type><parameter>filepath</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>entryname</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>start</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>ZipArchive::LENGTH_TO_END</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ZipArchive::FL_OVERWRITE</initializer></methodparam>
</methodsynopsis>
<para>
@@ -52,7 +52,10 @@
<term><parameter>length</parameter></term>
<listitem>
<para>
For partial copy, length to be copied, if 0 or -1 the whole file (starting from <parameter>start</parameter>) is used.
For partial copy, length to be copied,
if <constant>ZipArchive::LENGTH_TO_END</constant> (0) the file size is used,
if <constant>ZipArchive::LENGTH_UNCHECKED</constant> the whole file is used
(starting from <parameter>start</parameter>).
</para>
</listitem>
</varlistentry>
@@ -106,6 +109,12 @@
<constant>ZipArchive::FL_OPEN_FILE_NOW</constant> was added.
</entry>
</row>
<row>
<entry>8.3.0 / 1.22.2</entry>
<entry>
<constant>ZipArchive::LENGTH_TO_END</constant> and <constant>ZipArchive::LENGTH_UNCHECKED</constant> were added.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>

View File

@@ -12,7 +12,7 @@
<methodparam><type>string</type><parameter>filepath</parameter></methodparam>
<methodparam><type>int</type><parameter>index</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>start</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>ZipArchive::LENGTH_TO_END</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
@@ -52,7 +52,10 @@
<term><parameter>length</parameter></term>
<listitem>
<para>
For partial copy, length to be copied, if 0 or -1 the whole file (starting from <parameter>start</parameter>) is used.
For partial copy, length to be copied,
if <constant>ZipArchive::LENGTH_TO_END</constant> (0) the file size is used,
if <constant>ZipArchive::LENGTH_UNCHECKED</constant> the whole file is used
(starting from <parameter>start</parameter>).
</para>
</listitem>
</varlistentry>
@@ -99,6 +102,12 @@
<constant>ZipArchive::FL_OPEN_FILE_NOW</constant> was added.
</entry>
</row>
<row>
<entry>8.3.0 / 1.22.2</entry>
<entry>
<constant>ZipArchive::LENGTH_TO_END</constant> and <constant>ZipArchive::LENGTH_UNCHECKED</constant> were added.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>