'\"
'\" Copyright (c) 2015 Jan Nijtmans <[email protected]>
'\" Copyright (c) 2015 Christian Werner <[email protected]>
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH zipfs n 1.0 Zipfs "zipfs Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
zipfs \- Mount and work with ZIP files within Tcl
.SH SYNOPSIS
.nf
\fBpackage require zipfs \fR?\fB1.0\fR?
.sp
\fB::zipfs::exists\fR \fIfilename\fR
\fB::zipfs::find\fR \fIdir\fR
\fB::zipfs::info\fR \fIfilename\fR
\fB::zipfs::list\fR \fB?(-glob|-regexp)?\fR \fI?pattern?\fR
\fB::zipfs::mkimg\fR \fIoutfile\fR \fIindir\fR \fI?strip?\fR \fI?password?\fR \fI?infile?\fR
\fB::zipfs::mkkey\fR \fIpassword\fR
\fB::zipfs::mkzip\fR \fIoutfile\fR \fIindir\fR \fI?strip?\fR \fI?password?\fR
\fB::zipfs::mount\fR \fI?zipfile\fR \fI?mountpoint?\fR \fI?password?\fR
\fB::zipfs::unmount\fR \fIzipfile\fR
.fi
.BE
.SH DESCRIPTION
.PP
The \fBzipfs\fR package provides tcl with the ability to mount
the contents of a zip file as a virtual file system.
.TP
\fB::zipfs::mount ?\fIzipfile\fR? ?\fImountpoint\fR?
.
The \fB::zipfs::mount\fR procedure mounts a zipfile as a VFS.
After this command executes, files contained in \fIzipfile\fR
will appear to Tcl to be regular files at the mount point.
.RS
.PP
With no \fImountpoint\fR, returns the mount point for \fIzipfile\fR. With no \fIzipfile\fR,
return all zipfile/mount pairs. If \fImountpoint\fR is specified as an empty
string, mount on file path.
.RE
.TP
\fB::zipfs::unmount \fIzipfile\fR
.
Unmounts a previously mounted zip, \fIzipfile\fR.
.TP
\fB::zipfs::exists\fR \fIfilename\fR
.
Return 1 if the given filename exists in the mounted zipfs and 0 if it does not.
.TP
\fB::zipfs::info\fR \fIfile\fR
.
Return information about the given file in the mounted zipfs. The information
consists of (1) the name of the ZIP zipfile that contains the file, (2) the
size of the file after decompressions, (3) the compressed size of the file,
and (4) the offset of the compressed data in the zipfile.
.RS
.PP
Note: querying the mount point gives the start of zip data offset in (4),
which can be used to truncate the zip info off an executable.
.RE
.TP
\fB::zipfs::list\fR \fB?(-glob|-regexp)?\fR \fI?pattern?\fR
.
Return a list of all files in the mounted zipfs. The order of the names
in the list is arbitrary.
.TP
\fB::zipfs::mkimg\fR \fIoutfile\fR \fIindir\fR \fI?strip?\fR \fI?password?\fR \fI?infile?\fR
.
TODO
.TP
\fB::zipfs::mkkey\fR \fIpassword\fR
.
TODO
.TP
\fB::zipfs::mkzip\fR \fIoutfile\fR \fIindir\fR \fI?strip?\fR \fI?password?\fR
.
TODO
.SH "SEE ALSO"
tclsh(1), file(n), zlib(n)
.SH "KEYWORDS"
compress, filesystem, zip
'\" Local Variables:
'\" mode: nroff
'\" End: