cleanup, docs
This commit is contained in:
@@ -18,22 +18,13 @@ Creates a ZIP archive at `zip_file_name`.
|
||||
|
||||
`entries` can be a simple map where each key is the archive member name and each value is the file content:
|
||||
|
||||
```uce
|
||||
DValue entries;
|
||||
entries["hello.txt"] = "Hello ZIP";
|
||||
entries["nested/readme.txt"] = "Nested file";
|
||||
zip_create("/tmp/example.zip", entries);
|
||||
```
|
||||
|
||||
For list-shaped input or when the map key should not be the member name, each child can provide explicit fields:
|
||||
|
||||
```uce
|
||||
DValue item;
|
||||
item["name"] = "data/value.txt";
|
||||
item["content"] = "42";
|
||||
entries["ignored-key"] = item;
|
||||
```
|
||||
|
||||
An entry may also provide `file` instead of `content`; UCE reads that source file and stores its contents under `name`.
|
||||
|
||||
Entry names are normalized to forward slashes and rejected when they are absolute paths, drive-qualified paths, empty names, or contain `..` path segments.
|
||||
|
||||
:example
|
||||
print("zip_create example\n");
|
||||
|
||||
Reference in New Issue
Block a user