Plan 9 Plumber

Plumb Zip file

 

View files inside a zip compressed file via Plumber without extraction. Zip file contents are accessible at /n/tapefs. (Note: sam displays the UTF Byte-Order-Mark (BOM) as is - the garbage in the beginning of the first line).

#zip file content in a new window
type    is    text
data    matches    '([a-zA-Z¡-ï¿¿0-9_\-.,/]+)\.zip'
arg    isfile    $0
plumb    start    window fs/zipfs $file; cd /n/tapefs; ls; rc
 

Plumber process, usually running in the parent process, does not have visibility into the folders mounted by the child process because of namespace isolation. Hence, you need the following changes:

  1. zipfs (or 32vfs, cpiofs, tapfs, tarfs, tpfs, v6fs, v10fs etc.) must expose a service in the /srv directory. (fs.c)
  2. plumber must mount the zipfs for paths starting with /n/tapefs before checking for file existence. (match.c
 

Comments

Popular posts from this blog

Plan 9 : The Infinity Notebook

Plan 9: Quick Boot with UEFI

Comics Builder in GNU Emacs