1 .\" zip_open.mdoc -- open zip archive
2 .\" Copyright (C) 2003-2009 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.
43 .Fn zip_open "const char *path" "int flags" "int *errorp"
45 The zip archive specified by
47 is opened and a pointer to a
49 used to manipulate the archive, is returned.
54 the following values, or 0 for none of them.
55 .Bl -tag -offset indent -width ZIP_CHECKCONS
57 Create the archive if it does not exist.
59 Error if archive already exists.
61 Perform additional consistency checks on the archive, and error if
65 If an error occurs and
67 is non-NULL, it will be set to the corresponding error code.
69 Upon successful completion
78 is set to indicate the error.
80 The archive specified by
84 .It Bq Er ZIP_ER_EXISTS
90 .It Bq Er ZIP_ER_INCONS
91 Inconsistencies were found in the file specified by
96 .It Bq Er ZIP_ER_INVAL
101 .It Bq Er ZIP_ER_MEMORY
102 Required memory could not be allocated.
103 .It Bq Er ZIP_ER_NOENT
104 The file specified by
109 .It Bq Er ZIP_ER_NOZIP
110 The file specified by
112 is not a zip archive.
113 .It Bq Er ZIP_ER_OPEN
114 The file specified by
117 .It Bq Er ZIP_ER_READ
118 A read error occurred; see
121 .It Bq Er ZIP_ER_SEEK
122 The file specified by
124 does not allow seeks.
129 .Xr zip_error_to_str 3 ,
133 .An Dieter Baron Aq dillo@giga.or.at
135 .An Thomas Klausner Aq tk@giga.or.at