*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.
zip_fopen_index() function opens the
file at position index.
NULLis 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.