zip_close
close zip archive
- Provided by: libzip-dev (Version: 0.10.1-1.2)
- Source: libzip
- Report a bug
close zip archive
libzip (-lzip)
#include <zip.h>
int zip_close(struct zip *archive);
The zip_close function closes archive and frees the memory allocated for it. If any files within were changed, those changes are written to disk first. If writing changes fails, zip_close fails and archive is left unchanged. If archive contains no files, the file is completely removed (no empty archive is written).
Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in archive is set to indicate the error.
zip_close will fail if:
libzip(3), zip_error_get(3), zip_fdopen(3), zip_open(3), zip_strerror(3)
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>