Create a ZIP archive from files and directories in the virtual filesystem
Synopsis
zip [-r] <archive.zip> <path> [path...]
Description
Creates a ZIP archive containing the specified files and directories from the SLICC virtual filesystem. The archive is written to the VFS at the given path. Directories require the -r flag to be included recursively.
Options
-r Recurse into directories. Required when including directory paths.
-h, --help Show help message
Examples
$ zip archive.zip file1.txt file2.txt
Create an archive containing two files.
$ zip -r project.zip src/
Recursively archive the entire src/ directory.
$ zip -r bundle.zip index.html styles/ scripts/
Archive a file and two directories together.
Notes
This is a SLICC built-in implementation using the fflate library for in-browser ZIP compression. It operates entirely within the virtual filesystem — both input paths and the output archive are VFS paths.
Unlike the native zip command, this version has a simplified option set. It supports only the -r flag. Attempting to include a directory without -r produces an error.
Use open -d archive.zip to download the resulting archive to the local machine.
See Also
unzip, open