1ZIP_RENAME(3) Library Functions Manual ZIP_RENAME(3)
2
3
4
6 zip_rename - rename file in zip archive
7
9 libzip (-lzip)
10
12 #include <zip.h>
13
14 int zip_rename(struct zip *archive, int index, const char *name);
15
17 The file at position index in the zip archive archive is renamed to
18 name.
19
21 Upon successful completion 0 is returned. Otherwise, -1 is returned
22 and the error code in archive is set to indicate the error.
23
25 zip_rename fails if:
26
27 [ZIP_ER_DELETED]
28 The file to be renamed has been deleted from the archive.
29
30 [ZIP_ER_EXISTS]
31 There is already a file called name in the archive.
32
33 [ZIP_ER_INVAL]
34 index is not a valid file index in archive, name is NULL or
35 the empty string. Also a file cannot be renamed to a direcā
36 tory or vice versa. Directories are denoted by a trailing
37 slash.
38
40 libzip(3), zip_unchange(3)
41
43 Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
44
45
46
47NiH July 24, 2008 ZIP_RENAME(3)