1ZIP_SET_ARCHIVE_COMME... BSD Library Functions Manual ZIP_SET_ARCHIVE_COMME...
2

NAME

4     zip_set_archive_comment — set zip archive comment
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11
12     int
13     zip_set_archive_comment(zip_t *archive, const char *comment,
14         zip_uint16_t len);
15

DESCRIPTION

17     The zip_set_archive_comment() function sets the comment for the entire
18     zip archive.  If comment is NULL and len is 0, the archive comment will
19     be removed.  comment must be encoded in ASCII or UTF-8.
20

RETURN VALUES

22     Upon successful completion 0 is returned.  Otherwise, -1 is returned and
23     the error information in archive is set to indicate the error.
24

ERRORS

26     zip_set_archive_comment() fails if:
27
28     [ZIP_ER_INVAL]     len is less than 0 or longer than the maximum comment
29                        length in a zip file (65535), or comment is not a
30                        valid UTF-8 encoded string.
31
32     [ZIP_ER_MEMORY]    Required memory could not be allocated.
33

SEE ALSO

35     libzip(3), zip_file_get_comment(3), zip_file_set_comment(3),
36     zip_get_archive_comment(3)
37

HISTORY

39     zip_set_archive_comment() was added in libzip 0.7.  In libzip 0.11 the
40     type of len was changed from int to zip_uint16_t.
41

AUTHORS

43     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
44
45BSD                            December 18, 2017                           BSD
Impressum