Imported Upstream version 1.1.3
[platform/upstream/libzip.git] / man / zip_source_win32w.man
1 .TH "ZIP_SOURCE_WIN32W" "3" "March 11, 2015" "NiH" "Library Functions Manual"
2 .nh
3 .if n .ad l
4 .SH "NAME"
5 \fBzip_source_win32w\fR,
6 \fBzip_source_win32w_create\fR
7 \- create data source from a Windows Unicode file name
8 .SH "LIBRARY"
9 libzip (-lzip)
10 .SH "SYNOPSIS"
11 \fIzip_source_t *\fR
12 .PD 0
13 .HP 4n
14 \fBzip_source_win32w\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR);
15 .PD
16 .PP
17 \fIzip_source_t *\fR
18 .PD 0
19 .HP 4n
20 \fBzip_source_win32w_create\fR(\fIconst\ char\ *fname\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR, \fIzip_error_t\ *error\fR);
21 .PD
22 .SH "DESCRIPTION"
23 The functions
24 \fBzip_source_win32w\fR()
25 and
26 \fBzip_source_win32w_create\fR()
27 create a zip source on Windows using a Windows Unicode name.
28 They open
29 \fIfname\fR
30 and read
31 \fIlen\fR
32 bytes from offset
33 \fIstart\fR
34 from it.
35 If
36 \fIlen\fR
37 is 0 or \-1, the whole file (starting from
38 \fIstart\fR)
39 is used.
40 .PP
41 If the file supports seek, the source can be used to open a zip archive from.
42 .PP
43 The file is opened and read when the data from the source is used, usually by
44 \fBzip_close\fR()
45 or
46 \fBzip_open_from_source\fR().
47 .SH "RETURN VALUES"
48 Upon successful completion, the created source is returned.
49 Otherwise,
50 \fRNULL\fR
51 is returned and the error code in
52 \fIarchive\fR
53 or
54 \fIerror\fR
55 is set to indicate the error.
56 .SH "ERRORS"
57 \fBzip_source_win32w\fR()
58 and
59 \fBzip_source_win32w_create\fR()
60 fail if:
61 .TP 19n
62 [\fRZIP_ER_INVAL\fR]
63 \fIfname\fR,
64 \fIstart\fR,
65 or
66 \fIlen\fR
67 are invalid.
68 .TP 19n
69 [\fRZIP_ER_MEMORY\fR]
70 Required memory could not be allocated.
71 .TP 19n
72 [\fRZIP_ER_OPEN\fR]
73 Opening
74 \fIfname\fR
75 failed.
76 .SH "SEE ALSO"
77 libzip(3),
78 zip_add(3),
79 zip_replace(3),
80 zip_source(3),
81 zip_source_win32a(3),
82 zip_source_win32handle(3)
83 .SH "AUTHORS"
84 Dieter Baron <\fIdillo@nih.at\fR>
85 and
86 Thomas Klausner <\fItk@giga.or.at\fR>