25 lines
757 B
Plaintext
25 lines
757 B
Plaintext
: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.
|