1ZIP_CLOSE(3)               Library Functions Manual               ZIP_CLOSE(3)
2
3
4

NAME

6       zip_close - close zip archive
7

LIBRARY

9       libzip (-lzip)
10

SYNOPSIS

12       #include <zip.h>
13
14       int zip_close(struct zip *archive);
15

DESCRIPTION

17       The  zip_close  function  closes archive and frees the memory allocated
18       for it.  If any files within were changed, those changes are written to
19       disk  first.   If writing changes fails, zip_close fails and archive is
20       left unchanged.
21

RETURN VALUES

23       Upon successful completion 0 is returned.  Otherwise,  -1  is  returned
24       and the error code in archive is set to indicate the error.
25

ERRORS

27       zip_close will fail if:
28
29              [ZIP_ER_EOF]
30                  Unexpected end-of-file found while reading from a file.
31
32              [ZIP_ER_INTERNAL]
33                  The  callback function of an added or replaced file returned
34                  an error but failed to report which.
35
36              [ZIP_ER_INVAL]
37                  The path argument is NULL.
38
39              [ZIP_ER_MEMORY]
40                  Required memory could not be allocated.
41
42              [ZIP_ER_NOZIP]
43                  File is not a zip archive.
44
45              [ZIP_ER_READ]
46                  A file read failed.
47
48              [ZIP_ER_RENAME]
49                  A temporary file could not be renamed to its final name.
50
51              [ZIP_ER_SEEK]
52                  A file seek failed.
53
54              [ZIP_ER_TMPOPEN]
55                  A temporary file could not be created.
56
57              [ZIP_ER_WRITE]
58                  A file write failed.
59
60              [ZIP_ER_ZLIB]
61                  An  error  occurred  while  (de)compressing  a  stream  with
62                  zlib(3).
63       Additionally, any errors returned by the callback function for added or
64       replaced files will be passed back.
65

SEE ALSO

67       libzip(3), zip_error_get(3), zip_open(3), zip_strerror(3)
68

AUTHORS

70       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
71
72
73
74NiH                              June 9, 2005                     ZIP_CLOSE(3)
Impressum