diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-09-03 10:24:53 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-09-03 10:24:53 (GMT) |
commit | 89646f796eb2721743fc4c0d1974480794913baa (patch) | |
tree | 6ef568473277fe33238f2b8e7dabc759468e3849 | |
parent | a0116826f3c821cd26c8719e12118ef613339dec (diff) | |
download | tcl-89646f796eb2721743fc4c0d1974480794913baa.zip tcl-89646f796eb2721743fc4c0d1974480794913baa.tar.gz tcl-89646f796eb2721743fc4c0d1974480794913baa.tar.bz2 |
Clean up of docs, import basic text from comments in code, format.
-rw-r--r-- | doc/zvfs.n | 153 |
1 files changed, 114 insertions, 39 deletions
@@ -1,39 +1,114 @@ -'\"
-'\" Copyright (c) 2014 Sean Woods
-'\"
-'\" See the file "license.terms" for information on usage and redistribution
-'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
-.TH zvfs n 0.1 Zvfs "Zvfs Commands"
-.so man.macros
-.BS
-'\" Note: do not modify the .SH NAME line immediately below!
-.SH NAME
-http \- Client-side implementation of the HTTP/1.1 protocol
-.SH SYNOPSIS
-\fBpackage require zvfs ?0.1?\fR
-.sp
-\fB::zvfs::mount \fIZIPFILE \fIMOUNTPOINT\fR ...?
-.sp
-\fB::zvfs::unmount \fIZIPFILE\fR ...?
-.sp
-\fB::zvfs::append ?\fI\-option value\fR ...?
-.sp
-\fB::zvfs::add ?\fI\-option value\fR ...?
-.sp
-\fB::zvfs::exists ?\fI\-option value\fR ...?
-.sp
-\fB::zvfs::info ?\fI\-option value\fR ...?
-.sp
-\fB::zvfs::list ?\fI\-option value\fR ...?
-.sp
-\fB::zvfs::dump ?\fI\-option value\fR ...?
-.sp
-\fB::zvfs::start ?\fI\-option value\fR ...?
-.BE
-.SH DESCRIPTION
-.PP
-The \fBzvfs\fR package provides tcl with the ability to manipulate
-the contents of a zip file archive as a virtual file system.
-.PP
-The \fB::zvfs::mount\fR procedure mounts a zipfile as a VFS.
\ No newline at end of file +'\" +'\" Copyright (c) 2014 Sean Woods +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +.TH zvfs n 0.1 Zvfs "Zvfs Commands" +.so man.macros +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +zvfs \- Mount and work with ZIP files within Tcl +.SH SYNOPSIS +.nf +\fBpackage require zvfs \fR?\fB0.1\fR? +.sp +\fB::zvfs::add\fR ?\fB\-fconfigure \fIoptpairs...\fR? \fIarchive file1\fR ?\fIfile2 ...\fR? +\fB::zvfs::append\fR \fIarchive\fR ?\fIsource destination\fR? ?\fIsource destination...\fR? +\fB::zvfs::dump\fR \fIzipfile\fR +\fB::zvfs::exists\fR \fIfilename\fR +\fB::zvfs::info\fR \fIfile\fR +\fB::zvfs::list\fR ?\fB\-glob\fR|\fB\-regexp\fR? ?\fIpattern\fR? +\fB::zvfs::mount ?\fIarchive\fR? ?\fImountpoint\fR? +\fB::zvfs::start\fR \fIzipfile\fR +\fB::zvfs::unmount \fIarchive\fR +.fi +.BE +.SH DESCRIPTION +.PP +The \fBzvfs\fR package provides tcl with the ability to manipulate +the contents of a zip file archive as a virtual file system. +.TP +\fB::zvfs::mount ?\fIarchive\fR? ?\fImountpoint\fR? +. +The \fB::zvfs::mount\fR procedure mounts a zipfile as a VFS. +After this command +executes, files contained in the ZIP archive, \fIarchive\fR, will appear to Tcl to be +regular files at the mount point. +.RS +.PP +With no \fImountpoint\fR, returns the mount point for \fIarchive\fR. With no \fIarchive\fR, +return all archive/mount pairs. If \fImountpoint\fR is specified as an empty +string, mount on file path. +.RE +.TP +\fB::zvfs::unmount \fIarchive\fR +. +Unmounts a previously mounted zip, \fIarchive\fR. +.TP +\fB::zvfs::append\fR \fIarchive\fR ?\fIsource destination\fR? ?\fIsource destination...\fR? +. +This command reads \fIsource\fR files and appends them (using the name +\fIdestination\fR) to the zip archive named \fIarchive\fR. A new zip archive is created +if it does not already exist. If \fIarchive\fR refers to a file which exists but +is not a zip archive, then this command turns \fIarchive\fR into a zip archive by +appending the necessary records and the table of contents. Treat all files +as binary. +.RS +.PP +Note: No duplicate checking is done, so multiple occurances of the same file is +allowed. +.RE +.TP +\fB::zvfs::add\fR ?\fB\-fconfigure \fIoptpairs...\fR? \fIarchive file1\fR ?\fIfile2 ...\fR? +. +This command is similar to \fBzvfs::append\fR in that it adds files to the zip archive +named \fIarchive\fR, however file names are relative the current directory. In +addition, \fBfconfigure\fR is used to apply option pairs to set upon opening of +each file. Otherwise, default translation is allowed for those file +extensions listed in the \fB::zvfs::auto_ext\fR variable. Binary translation will be +used for unknown extensions. +.RS +.PP +NOTE: Use +.QW "\fB\-fconfigure {}\fR" +to use auto translation for all. +.RE +.TP +\fB::zvfs::exists\fR \fIfilename\fR +. +Return TRUE if the given filename exists in the mounted ZVFS and FALSE if it does +not. +.TP +\fB::zvfs::info\fR \fIfile\fR +. +Return information about the given file in the mounted ZVFS. The information +consists of (1) the name of the ZIP archive 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 archive. +.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::zvfs::list\fR ?\fB\-glob\fR|\fB\-regexp\fR? ?\fIpattern\fR? +. +Return a list of all files in the mounted ZVFS. The order of the names in the list +is arbitrary. +.TP +\fB::zvfs::dump\fR \fIzipfile\fR +. +Describe the contents of a zip. +.TP +\fB::zvfs::start\fR \fIzipfile\fR +. +This command strips returns the offset of zip data. +.SH "SEE ALSO" +tclsh(1), file(n), zlib(n) +.SH "KEYWORDS" +compress, filesystem, zip +'\" Local Variables: +'\" mode: nroff +'\" End: |