Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links.
You can here alternatively try to browse
the pure source code or just view
the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the libzip-1.5.2.tar.xz
project site itself.
close zip archive
zip_close() function writes any changes made to
archive to disk. If archive
contains no files, the file is completely removed (no empty archive is
written). If successful, archive is freed. If writing
archive is left unchanged and must still be freed.
To close and free a zip archive without saving changes, use
Upon successful completion 0 is returned. Otherwise, -1 is returned and the
error code in archive is set to indicate the error.
zip_close() will fail if:
Additionally, any errors returned by the callback function for added or replaced
files will be passed back.
- Unexpected end-of-file found while reading from a file.
- The callback function of an added or replaced file returned an error but
failed to report which.
- The path argument is
- Required memory could not be allocated.
- File is not a zip archive.
- A file read failed.
- A temporary file could not be renamed to its final name.
- A file seek failed.
- A temporary file could not be created.
- A file write failed.
- An error occurred while (de)compressing a stream with
zip_close() was added in libzip 0.6.