SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from PCLinuxOS lib64zip-devel-1.3.0-1pclos2017.x86_64.rpm

ZIP_CLOSE

Section: Library Functions Manual (3)
Updated: December 18, 2016
Index 

NAME

zip_close- close zip archive 

LIBRARY

libzip (-lzip) 

SYNOPSIS

#include <zip.h>

int

zip_close(zip_t *archive);
 

DESCRIPTION

Thezip_close()function closesarchiveand frees the memory allocated for it.If any files within were changed, those changes are written to diskfirst.If writing changes fails,zip_close()fails andarchiveis left unchanged.Ifarchivecontains no files, the file is completely removed (no empty archive iswritten).

To close a zip file without saving changes, usezip_discard(3). 

RETURN VALUES

Upon successful completion 0 is returned.Otherwise, -1 is returned and the error code inarchiveis set to indicate the error. 

ERRORS

zip_close()will fail if:
[ZIP_ER_EOF]
Unexpected end-of-file found while reading from a file.
[ZIP_ER_INTERNAL]
The callback function of an added or replaced file returned anerror but failed to report which.
[ZIP_ER_INVAL]
Thepathargument isNULL.
[ZIP_ER_MEMORY]
Required memory could not be allocated.
[ZIP_ER_NOZIP]
File is not a zip archive.
[ZIP_ER_READ]
A file read failed.
[ZIP_ER_RENAME]
A temporary file could not be renamed to its final name.
[ZIP_ER_SEEK]
A file seek failed.
[ZIP_ER_TMPOPEN]
A temporary file could not be created.
[ZIP_ER_WRITE]
A file write failed.
[ZIP_ER_ZLIB]
An error occurred while (de)compressing a stream withzlib(3).

Additionally, any errors returned by the callback functionfor added or replaced files will be passed back. 

SEE ALSO

libzip(3),zip_discard(3),zip_error_get(3),zip_fdopen(3),zip_open(3),zip_register_progress_callback(3),zip_strerror(3) 

AUTHORS

Dieter Baron <dilloAATTnih.at>andThomas Klausner <tkAATTgiga.or.at>


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUES
ERRORS
SEE ALSO
AUTHORS

This document was created byman2html,using the manual pages.