1ZIP_ADD_DIR(3) Library Functions Manual ZIP_ADD_DIR(3)
2
3
4
6 zip_add_dir - add directory to zip archive
7
9 libzip (-lzip)
10
12 #include <zip.h>
13
14 zip_int64_t zip_add_dir(struct zip *archive, const char *name);
15
17 The function zip_add_dir adds a directory to a zip archive. The argu‐
18 ment archive specifies the zip archive to which the directory should be
19 added. name is the directory's name in the zip archive.
20
22 Upon successful completion, the index of the new entry in the archive
23 is returned. Otherwise, -1 is returned and the error code in archive
24 is set to indicate the error.
25
27 zip_add_dir fails if:
28
29 [ZIP_ER_EXISTS]
30 There is already an entry called name in the archive.
31
32 [ZIP_ER_INVAL]
33 archive or name are NULL.
34
35 [ZIP_ER_MEMORY]
36 Required memory could not be allocated.
37
39 libzip(3), zip_add(3)
40
42 Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
43
44
45
46NiH March 10, 2009 ZIP_ADD_DIR(3)