| ZIP_FILE_EXTRA_FIELD_SET(3) | Library Functions Manual | ZIP_FILE_EXTRA_FIELD_SET(3) |
zip_file_extra_field_set —
#include <zip.h>
int
zip_file_extra_field_set(zip_t
*archive, zip_uint64_t
index, zip_uint16_t
extra_field_id,
zip_uint16_t
extra_field_index, const
zip_uint8_t *extra_field_data,
zip_uint16_t len,
zip_flags_t flags);
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
index in the zip archive. The extra field's data will be
set to extra_field_data and length
len. If a new entry shall be appended, set
extra_field_index to
ZIP_EXTRA_FIELD_NEW.
At least one of the following flags must be set:
ZIP_FL_CENTRALZIP_FL_LOCALPlease note that the extra field IDs 0x0001 (ZIP64 extension),
0x6375 (Infozip UTF-8 comment), and 0x7075 (Infozip UTF-8 file name) can not
be set using zip_file_extra_field_set() since they
are set by libzip(3) automatically when
needed.
zip_file_extra_field_set() fails if:
ZIP_ER_INVAL]ZIP_ER_MEMORY]ZIP_ER_NOENT]zip_file_extra_field_set() was added in libzip 0.11.
| December 18, 2017 | NetBSD 9.99.41 |