Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links.
You can here alternatively try to browse
the pure source code or just view
the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the libzip-1.5.2.tar.xz
project site itself.
add directory to zip archive
*archive, const char
zip_dir_add() adds a directory to a zip
archive. The argument archive specifies the zip archive
to which the directory should be added. name is the
directory's name in the zip archive. The flags argument
can be any of:
Upon successful completion, the index of the new entry in the archive is
returned. Otherwise, -1 is returned and the error code in
archive is set to indicate the error.
- Guess encoding of name (default).
- Interpret name as UTF-8.
- Interpret name as code page 437 (CP-437).
zip_dir_add() fails if:
- There is already an entry called name in the
- archive or name are
NULL, or invalid UTF-8 encoded file names.
- Required memory could not be allocated.
zip_dir_add() was added in libzip 0.11.
zip_dir_add() does not look in the file system, it just
creates one entry in the archive for the provided name.