1ZIP_FOPEN(3) Library Functions Manual ZIP_FOPEN(3)
2
3
4
6 zip_fopen , - .Nm zip_fopen_index open file in zip archive for reading
7
9 libzip (-lzip)
10
12 #include <zip.h>
13
14 struct zip_file * zip_fopen(struct zip *archive, const char *fname, int
15 flags);
16
17 struct zip_file * zip_fopen_index(struct zip *archive, int index, int
18 flags);
19
21 The zip_fopen function opens the file name fname in archive. The flags
22 argument specifies how the name lookup should be done, according to the
23 values are described in zip_name_locate(3). Also, the following values
24 may be or'ed to it.
25
26 ZIP_FL_COMPRESSED Read the compressed data. Otherwise the data
27 is uncompressed by zip_fread.
28
29 ZIP_FL_UNCHANGED Read the original data from the zip archive,
30 ignoring any changes made to the file.
31
32 The zip_fopen_index function opens the file at position index.
33
35 Upon successful completion, a
36
37 struct zip_file pointer is returned. Otherwise, NULL is returned and
38 the error code in archive is set to indicate the error.
39
41 [ZIP_ER_CHANGED]
42 The file data has been changed.
43
44 [ZIP_ER_COMPNOTSUPP]
45 The compression method used is not supported.
46
47 [ZIP_ER_MEMORY]
48 Required memory could not be allocated.
49
50 [ZIP_ER_READ]
51 A file read error occurred.
52
53 [ZIP_ER_SEEK]
54 A file seek error occurred.
55
56 [ZIP_ER_ZLIB]
57 Initializing the zlib stream failed.
58
59 The function zip_fopen may also fail and set for any of the errors
60 specified for the routine zip_name_locate(3).
61
62 The function zip_fopen_index may also fail with ZIP_ER_INVAL if index
63 is invalid.
64
66 libzip(3), zip_fclose(3), zip_fread(3), zip_name_locate(3)
67
69 Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
70
71
72
73NiH April 14, 2004 ZIP_FOPEN(3)