1ZIP_FILE_EXTRA_FIELD_... BSD Library Functions Manual ZIP_FILE_EXTRA_FIELD_...
2

NAME

4     zip_file_extra_field_delete, zip_file_extra_field_delete_by_id — delete
5     extra field for file in zip
6

LIBRARY

8     libzip (-lzip)
9

SYNOPSIS

11     #include <zip.h>
12
13     int
14     zip_file_extra_field_delete(zip_t *archive, zip_uint64_t index,
15         zip_uint16_t extra_field_index, zip_flags_t flags);
16
17     int
18     zip_file_extra_field_delete_by_id(zip_t *archive, zip_uint64_t index,
19         zip_uint16_t extra_field_id, zip_uint16_t extra_field_index,
20         zip_flags_t flags);
21

DESCRIPTION

23     The zip_file_extra_field_delete() function deletes the extra field with
24     index extra_field_index for the file at position index in the zip ar‐
25     chive.
26
27     If extra_field_index is ZIP_EXTRA_FIELD_ALL, then all extra fields will
28     be deleted.
29
30     The following flags are supported:
31
32           ZIP_FL_CENTRAL    Delete extra fields from the archive's central
33                             directory.
34
35           ZIP_FL_LOCAL      Delete extra fields from the local file headers.
36
37     The zip_file_extra_field_delete_by_id() function deletes the extra field
38     with ID (two-byte signature) extra_field_id and index extra_field_index
39     (in other words, the extra_field_index'th extra field with ID
40     extra_field_id) The other arguments are the same as for
41     zip_file_extra_field_delete() (ZIP_EXTRA_FIELD_ALL will delete all extra
42     fields of the specified ID).
43
44     Please note that due to the library design, the index of an extra field
45     may be different between central directory and local file headers.  For
46     this reason, it is not allowed to specify both ZIP_FL_CENTRAL and
47     ZIP_FL_LOCAL in flags, except when deleting all extra fields (i.e.,
48     extra_field_index being ZIP_EXTRA_FIELD_ALL).
49

RETURN VALUES

51     Upon successful completion 0 is returned.  Otherwise, -1 is returned and
52     the error code in archive is set to indicate the error.
53

ERRORS

55     zip_file_extra_field_delete() and zip_file_extra_field_delete_by_id()
56     fail if:
57
58     [ZIP_ER_NOENT]     index is not a valid file index in archive.
59

SEE ALSO

61     libzip(3), zip_file_extra_field_get(3), zip_file_extra_field_set(3),
62     zip_file_extra_fields_count(3)
63

HISTORY

65     zip_file_extra_field_delete() and zip_file_extra_field_delete_by_id()
66     were added in libzip 0.11.
67

AUTHORS

69     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
70
71BSD                            December 18, 2017                           BSD
Impressum