zip_file_get_comment man page
zip_file_get_comment — get comment for file in zip
Library
libzip (-lzip)
Synopsis
#include <zip.h>
const char *
zip_file_get_comment(zip_t *archive, zip_uint64_t index, zip_uint32_t *lenp, zip_flags_t flags);
Description, expecting them to be encoded in CP-437 in the ZIP archive (except if it is a UTF-8 comment from the special extra field). Convert it to UTF-8.
Note: ASCII is a subset of both CP-437 and UTF-8.
Return Values
Upon successful completion, a pointer to the comment is returned, or NULL if there is no comment. In case of an error, NULL is returned and the error code in archive is set to indicate the error.
Errors
zip_file_get_comment() fails if:
- [ZIP_ER_INVAL]
index is not a valid file index in archive.
See Also
libzip(3), zip_file_set_comment(3), zip_get_archive_comment(3)
Authors
Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
Referenced By
libzip(3), zip_file_set_comment(3), zip_get_file_comment(3).