1ZIP_SOURCE_FILE(3)         Library Functions Manual         ZIP_SOURCE_FILE(3)
2
3
4

NAME

6       zip_source_file - create data source from a file
7

LIBRARY

9       libzip (-lzip)
10

SYNOPSIS

12       struct  zip_source  *  zip_source_file(struct  zip *archive, const char
13       *fname); "zip_uint64_t start" "zip_int64_t len"
14

DESCRIPTION

16       The  function  zip_source_file  creates  a  zip  source  from  a  file.
17       zip_source_file  opens fname and reads len bytes from offset start from
18       it.  If len is 0 or -1, the whole file (starting from start ) is used.
19
20       The fie is opened and read when the data from the source is used,  usu‐
21       ally by zip_close.
22

RETURN VALUES

24       Upon successful completion, the created source is returned.  Otherwise,
25       NULL is returned and the error code in archive is set to  indicate  the
26       error.
27

ERRORS

29       zip_source_file fails if:
30
31              [ZIP_ER_INVAL]
32                  fname, start, or len are invalid.
33
34              [ZIP_ER_MEMORY]
35                  Required memory could not be allocated.
36
37              [ZIP_ER_OPEN]
38                  Opening fname failed.
39

SEE ALSO

41       libzip(3),     zip_add(3),     zip_replace(3),    zip_source_buffer(3),
42       zip_source_filep(3),    zip_source_free(3),     zip_source_function(3),
43       zip_source_zip(3)
44

AUTHORS

46       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
47
48
49
50NiH                             August 1, 2008              ZIP_SOURCE_FILE(3)
Impressum