Create ZIP entry
Syntax
zipEntry(
contents: binary("folder/hello.txt", "Hello world!"),
comment: "Index file.",
time: now(),
compress: true)
Description
Constructs an entry for a ZIP archive, see zipArchive()
.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
contents | Binary value | File to be packed into the archive. The file name also determines the folder inside the archive. The paths in the archive must be separated by "/" . |
yes | -/- |
comment | String | Comment about the content. Will be stored in the archive, but has no further meaning. | no | -/- |
compress | Boolean value | Whether the content should be compressed. | no | true |
time | Date or number | Timestamp of the file in the archive. A number is interpreted as the number of milliseconds since 1/1/1970 at 00:00 UTC. | no | now() |
Return value
Type: ZIP entry (can be used only in the context of creating a ZIP archive).
An entry of a ZIP file.