1 .\" zip_fopen.mdoc \-- open file in zip archive for reading
2 .\" Copyright (C) 2003-2011 Dieter Baron and Thomas Klausner
4 .\" This file is part of libzip, a library to manipulate ZIP archives.
5 .\" The authors can be contacted at <libzip@nih.at>
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in
14 .\" the documentation and/or other materials provided with the
16 .\" 3. The names of the authors may not be used to endorse or promote
17 .\" products derived from this software without specific prior
18 .\" written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
21 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
24 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 .TH ZIP_FOPEN 3 "February 14, 2011" NiH
34 zip_fopen , \- .Nm zip_fopen_index
35 open file in zip archive for reading
42 zip_fopen(struct zip *archive, const char *fname, int flags);
45 zip_fopen_index(struct zip *archive, zip_uint64_t index, int flags);
49 function opens the file name
55 argument specifies how the name lookup should be done, according to
56 the values are described in
58 Also, the following values may be
63 \fBZIP_FL_COMPRESSED\fR
64 Read the compressed data.
65 Otherwise the data is uncompressed by
68 \fBZIP_FL_UNCHANGED\fR
69 Read the original data from the zip archive, ignoring any changes made
75 function opens the file at position
78 If encrypted data is encountered, the functions call
79 zip_fopen_encrypted(3)
81 zip_fopen_index_encrypted(3)
82 respectively, using the default password set with
83 zip_set_default_password(3).
85 Upon successful completion, a
91 is returned and the error code in
93 is set to indicate the error.
98 The file data has been changed.
101 The compression method used is not supported.
104 The encryption method used is not supported.
107 Required memory could not be allocated.
110 A file read error occurred.
113 A file seek error occurred.
116 Initializing the zlib stream failed.
121 may also fail and set
123 for any of the errors specified for the routine
137 zip_get_num_entries(3),
139 zip_set_default_password(3)
142 Dieter Baron <dillo@giga.or.at>
144 Thomas Klausner <tk@giga.or.at>