1 .TH "ZIP_FOPEN" "3" "October 23, 2013" "NiH" "Library Functions Manual"
7 \- open file in zip archive for reading
11 \fB#include <zip.h>\fR
16 \fBzip_fopen\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_flags_t\ flags\fR);
22 \fBzip_fopen_index\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR);
27 function opens the file name
33 argument specifies how the name lookup should be done, according to
34 the values are described in
36 Also, the following values may be
41 \fRZIP_FL_COMPRESSED\fR
42 Read the compressed data.
43 Otherwise the data is uncompressed by
46 \fRZIP_FL_UNCHANGED\fR
47 Read the original data from the zip archive, ignoring any changes made
52 \fBzip_fopen_index\fR()
53 function opens the file at position
56 If encrypted data is encountered, the functions call
57 zip_fopen_encrypted(3)
59 zip_fopen_index_encrypted(3)
60 respectively, using the default password set with
61 zip_set_default_password(3).
63 Upon successful completion, a
68 is returned and the error code in
70 is set to indicate the error.
73 [\fRZIP_ER_CHANGED\fR]
74 The file data has been changed.
76 [\fRZIP_ER_COMPNOTSUPP\fR]
77 The compression method used is not supported.
79 [\fRZIP_ER_ENCRNOTSUPP\fR]
80 The encryption method used is not supported.
83 Required memory could not be allocated.
85 [\fRZIP_ER_NOPASSWD\fR]
86 The file is encrypted, but no password has been provided.
89 A file read error occurred.
92 A file seek error occurred.
94 [\fRZIP_ER_WRONGPASSWD\fR]
95 The provided password does not match the password used for encryption.
96 Note that some incorrect passwords are not detected by the check done by
100 Initializing the zlib stream failed.
104 may also fail and set
106 for any of the errors specified for the routine
110 \fBzip_fopen_index\fR()
120 zip_get_num_entries(3),
122 zip_set_default_password(3)
124 Dieter Baron <\fIdillo@nih.at\fR>
126 Thomas Klausner <\fItk@giga.or.at\fR>