1ZIP_GET_NAME(3) Library Functions Manual ZIP_GET_NAME(3)
2
3
4
6 zip_get_name - get name of file by index
7
9 libzip (-lzip)
10
12 #include <zip.h>
13
14 const char * zip_get_name(struct zip *archive, int index, int flags);
15
17 The zip_get_name function returns the name of the file at position
18 index in archive. If flags is set to ZIP_FL_UNCHANGED, the original
19 unchanged filename is returned. The returned string must not be modi‐
20 fied or freed, and becomes invalid when archive is closed.
21
23 Upon successful completion, a pointer to the name is returned. Other‐
24 wise, NULL and the error code in archive is set to indicate the error.
25
27 zip_get_name fails if:
28
29 [ZIP_ER_DELETED]
30 index refers to a file that has been deleted (see
31 zip_delete(3) ).
32
33 [ZIP_ER_INVAL]
34 index is not a valid file index in archive, or index points
35 to an added file and ZIP_FL_UNCHANGED is set.
36
38 libzip(3), zip_name_locate(3)
39
41 Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
42
43
44
45NiH January 20, 2005 ZIP_GET_NAME(3)