zip_fopen ,
.Nm zip_fopen_index open file in zip archive for reading
- Provided by: libzip-dev (Version: 0.10.1-1.2)
- Source: libzip
- Report a bug
.Nm zip_fopen_index open file in zip archive for reading
libzip (-lzip)
#include <zip.h>
struct zip_file * zip_fopen(struct zip *archive, const char *fname, int flags);
struct zip_file * zip_fopen_index(struct zip *archive, zip_uint64_t index, int flags);
The 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.
The zip_fopen_index function opens the file at position index.
If encrypted data is encountered, the functions call zip_fopen_encrypted(3) or zip_fopen_index_encrypted(3) respectively, using the default password set with zip_set_default_password(3).
Upon successful completion, a
struct zip_file pointer is returned. Otherwise, NULL is returned and the error code in archive is set to indicate the error.
The function zip_fopen may also fail and set for any of the errors specified for the routine zip_name_locate(3).
The function zip_fopen_index may also fail with ZIP_ER_INVAL if index is invalid.
libzip(3), zip_fclose(3), zip_fread(3), zip_get_num_entries(3), zip_name_locate(3), zip_set_default_password(3)
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>