Starkit Meet Zip

Difference between version 6 and 7 - Previous - Next
'''starkit meet zip file'''

This is just another '''wow''' feature.  There are gems just waiting to be picked up in starkits, and here is one that I found while reading "./lib/vfs/zipvfs.tcl"  You can do that by [inspecting your new starkit].

Now I don't know what this feature is for exactly, but I do know how it can be used:

======
  package require zipvfs
  set f [vfs::zip::Mount myzip.zip myzip.zip]
======[MHo] 2020-11-25: should it be 
======
package require vfs::zip
======
?

Now you can go into the myzip.zip directory (that is all emulated via [tclvfs] beautifully) and you can do all the regular things on files.

[[ [Vince] adds this feature is there so that a starkit can access all currently supported vfs types, these include ftp, http, webdav and zip --- if you do run into problems with these (bugs definitely remain) please do diagnose and provide patches to fix them --- it's all pure Tcl code]]

Wow your friends by unzipping without a zip program:

======
  file copy myzip.zip unzip
======

My computer grinds for a bit then lookee lookee, I've uncompressed the zip file to an unzip/ dir. 

Then unmount the file with:
======
  vfs::zip::Unmount $f myzip.zip
======

And for the terminally curious:
======
  # Used to execute a zip archive.  This is rather like a jar file
  # but simpler.  We simply mount it and then source a toplevel
  # file called 'main.tcl'.
  proc vfs::zip::Execute {zipfile} {
  etc...
======

----
[Sexy Starkits]

<<categories>> Tclkit