1 .\" zip_fdopen.mdoc -- open zip archive using existing file descriptor
2 .\" Copyright (C) 2009-2015 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.
37 .Nd open zip archive using open file descriptor
43 .Fn zip_fdopen "int fd" "int flags" "int *errorp"
45 The zip archive specified by the open file descriptor
47 is opened and a pointer to a
49 used to manipulate the archive, is returned.
54 the archive can only be opened in read-only mode.
57 argument may not be used any longer after calling
63 the following values, or 0 for none of them.
64 .Bl -tag -offset indent -width ZIP_CHECKCONS
66 Perform additional stricter consistency checks on the archive, and
70 If an error occurs and
74 it will be set to the corresponding error code.
76 Upon successful completion
82 should not be used any longer, nor passed to
88 is set to indicate the error.
95 is prepared for use by
99 .It Bq Er ZIP_ER_INCONS
100 Inconsistencies were found in the file specified by
102 This error is often caused by specifying
104 but can also happen without it.
105 .It Bq Er ZIP_ER_INVAL
111 flags are allowed for
115 .It Bq Er ZIP_ER_MEMORY
116 Required memory could not be allocated.
117 .It Bq Er ZIP_ER_NOZIP
118 The file specified by
120 is not a zip archive.
121 .It Bq Er ZIP_ER_OPEN
122 The file specified by
124 could not be prepared for use by
126 .It Bq Er ZIP_ER_READ
127 A read error occurred; see
130 .It Bq Er ZIP_ER_SEEK
131 The file specified by
133 does not allow seeks.
138 .Xr zip_error_to_str 3 ,
142 .An Dieter Baron Aq Mt dillo@nih.at
144 .An Thomas Klausner Aq Mt tk@giga.or.at