Skip to end of metadata
Go to start of metadata

Availability

This routine is available starting with SIL Engine™ 4.0.0.

Syntax

zipFiles(files, zipFileName)

Description

Adds a file or an array of files to a zip file. If the zip file doesn't exist, it will be created, otherwise it will be appended with all files that exist.

Parameters

Parameter name

Type

Required

Description

files

string[]

Yes

List of files.

zipFileNamestringYesName of the zip file.

Return type

The function returns 'true' if at least one file was added to the zip file and 'false' otherwise.

boolean (true/false)

Example

zipFiles({"C:/file1.txt", "C:/file2.txt"}, "nameOfZip");

Notes

It is recommended that you use forward slashes ( / ) for file paths.

See also