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
String zip_read(String zip_file_name, String entry_name)
:params
zip_file_name : path to the ZIP archive
entry_name : member name to read from the archive
return value : uncompressed entry contents
:see
>sys
zip_create
zip_list
zip_extract
:content
Reads one file member from a ZIP archive and returns its uncompressed bytes as a `String`.
```uce
String body = zip_read("/tmp/example.zip", "hello.txt");
```
`entry_name` is normalized to forward slashes and rejected when it is empty, absolute, drive-qualified, or contains a `..` path segment.
Use `zip_list()` when you need to discover entry names before reading them.