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, off_t start, off_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

RETURN VALUES

21       Upon successful completion, the created source is returned.  Otherwise,
22       NULL  is  returned and the error code in archive is set to indicate the
23       error.
24

ERRORS

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

SEE ALSO

38       libzip(3),    zip_add(3),     zip_replace(3),     zip_source_buffer(3),
39       zip_source_filep(3),     zip_source_free(3),    zip_source_function(3),
40       zip_source_zip(3)
41

AUTHORS

43       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
44
45
46
47NiH                              July 20, 2005              ZIP_SOURCE_FILE(3)
Impressum