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

NAME

6       zip_fdopen - open zip archive using open file descriptor
7

LIBRARY

9       libzip (-lzip)
10

SYNOPSIS

12       #include <zip.h>
13
14       struct zip * zip_fdopen(int fd, int flags, int *errorp);
15

DESCRIPTION

17       The  zip archive specified by the open file descriptor fd is opened and
18       a pointer to a
19
20       struct zip, used to manipulate the archive, is returned.   In  contrast
21       to zip_open(3), using the archive can only be opened in read-only mode.
22       The fd argument may not be used any longer after calling The are speci‐
23       fied by or'ing the following values, or 0 for none of them.
24
25              ZIP_CHECKCONS  Perform  additional consistency checks on the ar‐
26                             chive, and error if they fail.
27
28       If an error occurs and errorp is it will be set  to  the  corresponding
29       error code.
30

RETURN VALUES

32       Upon successful completion zip_fdopen returns a
33
34       struct zip pointer, and fd should not be used any longer, nor passed to
35       close(2).  Otherwise, NULL is returned and *errorp is set  to  indicate
36       the error.  In the error case, fd remains unchanged.
37

ERRORS

39       The file specified by fd is prepared for use by libzip(3) unless:
40
41              [ZIP_ER_INCONS]
42                  Inconsistencies were found in the file specified by path and
43                  ZIP_CHECKCONS was specified.
44
45              [ZIP_ER_INVAL]
46                  The flags argument is invalid.  Not  all  zip_open(3)  flags
47                  are allowed for see DESCRIPTION.
48
49              [ZIP_ER_MEMORY]
50                  Required memory could not be allocated.
51
52              [ZIP_ER_NOZIP]
53                  The file specified by fd is not a zip archive.
54
55              [ZIP_ER_OPEN]
56                  The  file  specified  by fd could not be prepared for use by
57                  libzip(3).
58
59              [ZIP_ER_READ]
60                  A read error occurred; see for details.
61
62              [ZIP_ER_SEEK]
63                  The file specified by fd does not allow seeks.
64

SEE ALSO

66       libzip(3), zip_close(3), zip_error_to_str(3), zip_open(3)
67

AUTHORS

69       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
70
71
72
73NiH                            February 1, 2010                  ZIP_FDOPEN(3)
Impressum