Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions reference/zip/ziparchive/close.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
Close opened or created archive and save changes. This method is
automatically called at the end of the script.
</simpara>
<note>
<simpara>
All modifications to the archive (adding, removing, or renaming
entries) are performed in memory and only written to disk when
this method is called. As a result, errors related to file system
operations (such as permission denied or missing directories) will
only surface at close time rather than when the modification
methods are called.
</simpara>
</note>
<simpara>
If the archive contains no files, the file is completely removed by default
(no empty archive is written) according to the value of the
Expand Down
11 changes: 11 additions & 0 deletions reference/zip/ziparchive/open.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
<simpara>
Since libzip 1.6.0, an empty file is not a valid archive any longer.
</simpara>
<note>
<simpara>
When creating a new archive with <constant>ZipArchive::CREATE</constant>,
the file is not actually written to disk until
<methodname>ZipArchive::close</methodname> is called. Therefore, errors
related to the file system (such as permission denied or a
non-existent parent directory) will only be reported when calling
<methodname>ZipArchive::close</methodname>, not when calling this
method.
</simpara>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
Expand Down