unzip
The unzip namespace extracts compressed archives using Windowsβ built-in tar.exe utility.
Functions
Section titled βFunctionsβ| Function | Parameters | Returns | Description |
|---|---|---|---|
unzip.extract |
archive_path: string, destination: string |
boolean |
Extracts full archive into destination directory. |
unzip.unzip_file |
directory: string, destination: string, filename: string |
boolean |
Extracts a single named file from an archive. |
Example
Section titled βExampleβlocal archive = "aimsense/scripts/data/assets.zip"local output_dir = "aimsense/scripts/data/assets"
if files.exists(archive) then local ok = unzip.extract(archive, output_dir) if ok then print("Assets extracted successfully!") else print("Failed to extract assets archive.") endend