Extract files from a ZIP archive in the virtual filesystem
Synopsis
unzip <archive.zip> [-d <destination>]
Description
Extracts all files from a ZIP archive into the SLICC virtual filesystem. By default, files are extracted to the current working directory. Use -d to specify an alternative destination directory, which is created automatically if it does not exist.
Options
-d <destination> Extract files into the specified directory instead of the current directory.
-h, --help Show help message
Examples
$ unzip archive.zip
Extract all files from archive.zip into the current directory.
$ unzip project.zip -d /workspace/project
Extract all files into the /workspace/project directory.
Notes
This is a SLICC built-in implementation using the fflate library for in-browser ZIP decompression. It operates entirely within the virtual filesystem.
The command includes path traversal protection — entries with paths that escape the destination root (e.g. ../ sequences) are blocked and cause the command to exit with an error.
Directory entries in the archive are skipped; only files are extracted. Parent directories are created automatically as needed.
See Also
zip, open