1 .TH "ZIP_FILE_SET_COMMENT" "3" "December 18, 2017" "NiH" "Library Functions Manual"
5 \fBzip_file_set_comment\fR
6 \- set comment for file in zip
10 \fB#include <zip.h>\fR
16 \fBzip_file_set_comment\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIconst\ char\ *comment\fR, \fIzip_uint16_t\ len\fR, \fIzip_flags_t\ flags\fR);
20 \fBzip_file_set_comment\fR()
21 function sets the comment for the file at position
33 is 0, the file comment will be removed.
36 argument can be any of:
38 \fRZIP_FL_ENC_GUESS\fR
43 \fRZIP_FL_ENC_UTF_8\fR
48 \fRZIP_FL_ENC_CP437\fR
51 as code page 437 (CP-437).
53 Upon successful completion 0 is returned.
54 Otherwise, \-1 is returned and the error information in
56 is set to indicate the error.
58 \fBzip_file_set_comment\fR()
63 is not a valid file index in
67 is less than 0 or longer than the maximum comment length in a zip file
70 is not a valid UTF-8 encoded string.
73 Required memory could not be allocated.
78 was opened in read-only mode.
81 zip_file_get_comment(3),
82 zip_get_archive_comment(3),
83 zip_set_archive_comment(3)
85 \fBzip_file_set_comment\fR()
86 was added in libzip 0.11.
88 Dieter Baron <\fIdillo@nih.at\fR>
90 Thomas Klausner <\fItk@giga.or.at\fR>