1ZIP_SOURCE_BEGIN_WRIT... BSD Library Functions Manual ZIP_SOURCE_BEGIN_WRIT...
2

NAME

4     zip_source_begin_write, zip_source_begin_write_cloning — prepare zip
5     source for writing
6

LIBRARY

8     libzip (-lzip)
9

SYNOPSIS

11     #include <zip.h>
12
13     int
14     zip_source_begin_write(zip_source_t *source);
15
16     int
17     zip_source_begin_write_cloning(zip_source_t *source,
18         zip_uint64_t offset);
19

DESCRIPTION

21     The functions zip_source_begin_write() and
22     zip_source_begin_write_cloning() prepare source for writing.  Usually
23     this involves creating temporary files or allocating buffers.
24
25     zip_source_begin_write_cloning() preserves the first offset bytes of the
26     original file.  This is done efficiently, and writes to source won't
27     overwrite the original data until zip_commit_write() is called.
28

RETURN VALUES

30     Upon successful completion 0 is returned.  Otherwise, -1 is returned and
31     the error information in source is set to indicate the error.
32

SEE ALSO

34     libzip(3), zip_source(3), zip_source_commit_write(3),
35     zip_source_rollback_write(3), zip_source_seek_write(3),
36     zip_source_tell_write(3), zip_source_write(3)
37

HISTORY

39     zip_source_begin_write() was added in libzip 1.0.
40
41     zip_source_begin_write_cloning() was added in libzip 1.4.0.
42

AUTHORS

44     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
45
46BSD                            December 18, 2017                           BSD
Impressum