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.
open file in zip archive for reading
*archive, const char
zip_fopen() function opens the file name
fname in archive. The
flags argument specifies how the name lookup should be
done, according to the values are described in
zip_name_locate(3). Also, the
following values may be or'ed to it.
- Read the compressed data. Otherwise the data is uncompressed by
- Read the original data from the zip archive, ignoring any changes made to
zip_fopen_index() function opens the
file at position index.
If encrypted data is encountered, the functions call
respectively, using the default password set with
Upon successful completion, a struct zip_file pointer is
NULL is returned and the error
code in archive is set to indicate the error.
- The file data has been changed.
- The compression method used is not supported.
- The encryption method used is not supported.
- Required memory could not be allocated.
- The file is encrypted, but no password has been provided.
- A file read error occurred.
- A file seek error occurred.
- The provided password does not match the password used for encryption.
Note that some incorrect passwords are not detected by the check done by
- Initializing the zlib stream failed.
zip_fopen() may also fail and
set zip_err for any of the errors specified for the
zip_fopen_index() may also
index is invalid.
zip_fopen_index() were added in libzip 1.0.