Package libzip-devel

Development files for libzip

http://www.nih.at/libzip/index.html

The libzip-devel package contains libraries and header files for
developing applications that use libzip.

Library Functions (Section 3)
libzip
libzip is a library for reading, creating, and modifying zip archives.
zip_add
The function zip_add() is the obsolete version of zip_file_add(3). It is the same as calling zip_file_add(3) with an empty flags argument. Similarly, the...
zip_add_dir
The function zip_add_dir() is the obsolete version of zip_dir_add(3). It is the same as calling zip_dir_add(3) with an empty flags argument.
zip_close
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...
zip_delete
The file at position index in the zip archive archive is marked as deleted.
zip_dir_add
The function zip_dir_add() adds a directory to a zip archive. The argument archive specifies the zip archive to which the directory should be added. name is the...
zip_discard
The zip_discard() function closes archive and frees the memory allocated for it. Any changes to the archive are not written to disk and discarded.
zip_error_clear
The zip_error_clear() function clears the error state for the zip archive archive. The zip_file_error_clear() function does the same for the zip file file.
zip_error_code_system
The zip_error_code_system() function returns the system specific part of the error from the zip_error error ze. For finding out what system reported the error...
zip_error_code_zip
The zip_error_code_zip() function returns the libzip specific part of the error from the zip_error error ze.
zip_error_fini
The zip_error_fini() function cleans up and frees internally allocated memory of the zip_error pointed to by ze.
zip_error_get
The functions zip_error_get() and zip_file_error_get() are deprecated. Use zip_error_code_system(3), zip_error_code_zip(3), zip_file_get_error(3), and...
zip_error_get_sys_type
The function zip_error_get_sys_type() is deprecated; use zip_error_init_with_code(3) and zip_error_system_type(3) instead. Replace
zip_error_init
The zip_error_init() function initializes the zip_error pointed to by error. *error must be allocated before calling zip_error_init(). The...
zip_errors
list of all libzip error codes
zip_error_set
The zip_error_set() function sets the zip_error pointed to by ze to the libzip error code le and the system error code se. ze must be allocated and initialized...
zip_error_strerror
The zip_error_strerror() function returns an error message string corresponding to ze like strerror(3). This string will stay valid until the next call to...
zip_error_system_type
The zip_error_system_type() function returns the type of the system specific part for the zip_error ze.
zip_error_to_data
zip_error_to_data() function converts the zip_error ze into data suitable as return value for ZIP_SOURCE_ERROR. The data is written into the buffer data of size...
zip_error_to_str
The function zip_error_to_str() is deprecated; use zip_error_init_with_code(3) and zip_error_strerror(3) instead. Replace
zip_fclose
The zip_fclose() function closes file and frees the memory allocated for it.
zip_fdopen
The zip archive specified by the open file descriptor fd is opened and a pointer to a struct zip, used to manipulate the archive, is returned. In contrast to...
zip_file_add
The function zip_file_add() adds a file to a zip archive, while zip_file_replace() replaces an existing file in a zip archive. The argument archive specifies...
zip_file_extra_field_delete
The zip_file_extra_field_delete() function deletes the extra field with index extra_field_index for the file at position index in the zip archive. If...
zip_file_extra_field_get
The zip_file_extra_field_get() function returns the extra field with index extra_field_index for the file at position index in the zip archive. This pointer...
zip_file_extra_fields_count
The zip_file_extra_fields_count() function counts the extra fields for the file at position index in the zip archive.
zip_file_extra_field_set
The zip_file_extra_field_set() function sets the extra field with ID (two-byte signature) extra_field_id and index extra_field_index for the file at position...
zip_file_get_comment
The zip_file_get_comment() function returns the comment for the file at position index in the zip archive. The name is in UTF-8 encoding unless ZIP_FL_ENC_RAW...
zip_file_get_error
zip_file_get_error() function returns the zip_error associated with the zip_file zf.
zip_file_get_external_attributes
The zip_file_get_external_attributes() function returns the operating system and external attributes for the file at position index in the zip archive. The...
zip_file_rename
The file at position index in the zip archive archive is renamed to name.
zip_file_set_comment
The zip_file_set_comment() function sets the comment for the file at position index in the zip archive to comment of length len. If comment is NULL and len is...
zip_file_set_external_attributes
The zip_file_set_external_attributes() function sets the operating system and external attributes for the file at position index in the zip archive. Currently...
zip_file_set_mtime
The zip_file_set_mtime() function sets the last modification time (mtime) for the file at position index in the zip archive to mtime. Currently, no support for...
zip_fopen
The zip_fopen() function opens the file name fname in archive. The flags argument specifies how the name lookup should be done, according to the values are...
zip_fopen_encrypted
The zip_fopen_encrypted() function opens the encrypted file name fname in archive using the password given in the password argument. The flags argument are the...
zip_fread
The zip_fread() function reads at most nbytes bytes from file into buf.
zip_get_archive_comment
The zip_get_archive_comment() function returns the comment for the entire zip archive. The name is in UTF-8 encoding unless ZIP_FL_ENC_RAW was specified (see...
zip_get_archive_flag
The zip_get_archive_flag() function returns if the flag flag is set for the archive archive. The archive flags might have been changed with...
zip_get_error
The zip_get_error() function returns the zip error for the zip archive archive.
zip_get_file_comment
The zip_get_file_comment() function is the obsolete version of zip_file_get_comment(3). The only differences are the types of the lenp and flags arguments.
zip_get_name
The zip_get_name() function returns the name of the file at position index in archive. The name is in UTF-8 encoding unless ZIP_FL_ENC_RAW was specified (see...
zip_get_num_entries
The zip_get_num_entries() function returns the number of files in archive. If flags is set to ZIP_FL_UNCHANGED, the original number of entries is returned.
zip_get_num_files
This function is deprecated. Use zip_get_num_entries(3) instead. The zip_get_num_files() function returns the number of files in archive.
zip_name_locate
The zip_name_locate() function returns the index of the file named fname in archive. If archive does not contain a file with that name, -1 is returned. The...
zip_open
The zip_open() function opens the zip archive specified by path and returns a pointer to a struct zip, used to manipulate the archive. The flags are specified...
zip_rename
zip_rename() is the obsolete version of zip_file_rename(3). It is the same as calling zip_file_rename(3) with an empty flags argument.
zip_set_archive_comment
The zip_set_archive_comment() function sets the comment for the entire zip archive. If comment is NULL and len is 0, the archive comment will be removed...
zip_set_archive_flag
The zip_set_archive_flag() function sets the flag flag for the archive archive to the value value. Currently there are no supported flags.
zip_set_default_password
The zip_set_default_password() function sets the default password used when accessing encrypted files. If password is NULL, the default password is unset. If...
zip_set_file_comment
The zip_set_file_comment() function is the obsolete version of zip_file_set_comment(3). The only differences are the type of the len argument and the additional...
zip_set_file_compression
The zip_set_file_compression() function sets the compression method for the file at position index in the zip archive to comp with the compression method...
zip_source
A struct zip_source is a data source used by libzip(3) for adding or replacing file contents for a file in a zip archive. If the source supports seeking, it can...
zip_source_begin_write
The function zip_source_begin_write() prepares source for writing. Usually this involves creating temporary files or allocating buffers.
zip_source_buffer
The functions zip_source_buffer() and zip_source_buffer_create() create a zip source from the buffer data of size len. If freep is non-zero, the buffer will be...
zip_source_close
The function zip_source_close() closes source, indicating that no more data will be read.
zip_source_commit_write
The function zip_source_commit_write() finishes writing data to source and replaces the original with the newly written data.
zip_source_error
The zip_source_error() function returns the zip error for the data source source.
zip_source_file
The functions zip_source_file() and zip_source_file_create() create a zip source from a file. They open fname and read len bytes from offset start from it. If...
zip_source_filep
The functions zip_source_filep() and zip_source_filep_create() create a zip source from a file stream. They read len bytes from offset start from the open file...
zip_source_free
The function zip_source_free() decrements the reference count of source and frees it if the reference count drops to 0. If source is NULL, it does nothing...
zip_source_function
The functions zip_source_function() and zip_source_function_create() creates a zip source from the user-provided function fn, which must be of the following...
ZIP_SOURCE_GET_ARGS
The ZIP_SOURCE_GET_ARGS() macro casts data to a pointer to type.
zip_source_is_deleted
The function zip_source_is_deleted() returns whether the zip_source was deleted. This can for example happen when all entries are removed from a zip archive.
zip_source_keep
The function zip_source_keep() increments the reference count of source.
zip_source_make_command_bitmap
The zip_source_make_command_bitmap() function returns a bitmap of source commands suitable as return value for ZIP_SOURCE_SUPPORTS. It includes all the commands...
zip_source_open
The function zip_source_open() opens source for reading.
zip_source_read
The function zip_source_read() reads up to len bytes of data from source at the current read offset into the buffer data. The zip source source has to be opened...
zip_source_rollback_write
The function zip_source_rollback_write() reverts changes written to source, restoring the data before zip_source_begin_write(3) was called. Usually this removes...
zip_source_seek
The function zip_source_seek() sets the current read offset for source.
zip_source_seek_compute_offset
Use this function to compute the offset for a ZIP_SOURCE_SEEK or ZIP_SOURCE_SEEK_WRITE command. data and data_length are the arguments to the source callback...
zip_source_seek_write
The function zip_source_seek_write() sets the current write offset for source.
zip_source_stat
The zip_source_stat() function obtains information about the zip source source The sb argument is a pointer to a struct zip_source_stat (shown below), into...
zip_source_tell
The function zip_source_tell() returns the current read offset for source. The return value can be passed to zip_source_seek(3) with whence set to SEEK_SET to...
zip_source_tell_write
The function zip_source_tell_write() returns the current write offset for source. The return value can be passed to zip_source_seek_write(3) with whence set to...
zip_source_win32a
The functions zip_source_win32a() and zip_source_win32a_create() create a zip source on Windows using a Windows ANSI name. They open fname and read len bytes...
zip_source_win32handle
The functions zip_source_win32handle() and zip_source_win32handle_create() create a zip source from a Windows file handle. They open fname and read len bytes...
zip_source_win32w
The functions zip_source_win32w() and zip_source_win32w_create() create a zip source on Windows using a Windows Unicode name. They open fname and read len bytes...
zip_source_write
The function zip_source_write() writes len bytes from the buffer data to the zip source source at the current write offset. The zip source source has to be...
zip_source_zip
The function zip_source_zip() creates a zip source from a file in a zip archive. The srcarchive argument is the (open) zip archive containing the source zip...
zip_stat
The zip_stat() function obtains information about the file named fname in archive. The flags argument specifies how the name lookup should be done. Its values...
zip_stat_init
The zip_stat_init() function initializes the members of a struct zip_stat. The current members are described in zip_stat(3), but this function should be used to...
zip_strerror
The zip_strerror() function returns a string describing the last error for the zip archive archive, while the zip_file_strerror() function does the same for a...
zip_unchange
Changes to the file at position index are reverted.
zip_unchange_all
All changes to files and global information in archive are reverted.
zip_unchange_archive
Revert all global changes to the archive archive. This reverts changes to the archive comment and global flags.