Capy-Bearer Documentation

zip_create

host call

Capy

function zip_create(path : string, entries : dval) bool

Description

zip_create() creates a ZIP archive from a dval map of entry names and content.

Parameters

path : archive path

entries : archive entries

Return Values

true when the server creates the archive.

Example

Capy

var archive := file_temp("/tmp/capy-zip-") + ".zip"
zip_create(archive, dval({"note.txt": "hello"}))
print(zip_read(archive, "note.txt"), "\n")
file_unlink(archive)