ZIP_GET_NAME(3) | Library Functions Manual | ZIP_GET_NAME(3) |
zip_get_name
—
#include <zip.h>
const char *
zip_get_name
(zip_t
*archive, zip_uint64_t
index, zip_flags_t
flags);
zip_get_name
() function returns the name of the file
at position index in archive. The
name is in UTF-8 encoding unless ZIP_FL_ENC_RAW
was
specified (see below).
If flags is set to
ZIP_FL_UNCHANGED
, the original unchanged filename is
returned. The returned string must not be modified or freed, and becomes
invalid when archive is closed.
Additionally, the following flags are supported:
ZIP_FL_ENC_RAW
ZIP_FL_ENC_GUESS
ZIP_FL_ENC_STRICT
NULL
and the error code in
archive is set to indicate the error.
zip_get_name
() fails if:
ZIP_ER_DELETED
]ZIP_ER_INVAL
]ZIP_FL_UNCHANGED
is set.ZIP_ER_MEMORY
]zip_get_name
() was added in libzip 0.6. In libzip 0.10
the type of index was changed from
int to zip_uint64_t. In libzip
0.11 the type of flags was changed from
int to zip_flags_t.
December 18, 2017 | NetBSD 8.99.35 |