Manpages - zip_file_set_comment.3

libzip (-lzip)

The

function sets the comment for the file at position

in the zip archive to

of length

If

is

and

is 0, the file comment will be removed. The

argument can be any of:

Guess encoding of

(default). (Only CP-437 and UTF-8 are recognized.)

Interpret

as UTF-8.

Interpret

as code page 437 (CP-437).

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

is not a valid file index in

or

is less than 0 or longer than the maximum comment length in a zip file (65535), or

is not a valid UTF-8 encoded string.

Required memory could not be allocated.

The

was opened in read-only mode.

was added in libzip 0.11.

and

Author: dt

Created: 2022-02-20 Sun 20:45