Add archive helpers and harden task runtime

This commit is contained in:
udo
2026-05-21 00:00:23 +00:00
parent 9f7625c7fd
commit 02e153a6a7
71 changed files with 12817 additions and 305 deletions
+24
View File
@@ -0,0 +1,24 @@
:sig
bool zip_extract(String zip_file_name, String destination_directory)
:params
zip_file_name : path to the ZIP archive
destination_directory : directory that should receive extracted files
return value : `true` when extraction completes
:see
>sys
zip_create
zip_list
zip_read
:content
Extracts every member in a ZIP archive into `destination_directory`.
```uce
zip_extract("/tmp/example.zip", "/tmp/example-extract");
```
UCE creates the destination directory and any needed child directories when they do not already exist.
For safety, every member name is normalized and checked before extraction. Absolute paths, drive-qualified paths, empty names, and `..` path segments are rejected so archives cannot write outside the destination directory.