You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

create_archive()

Usage

create_archive(archiveFileName, files[, CustomFileType])

Description
Creates an archive with the given file (and folder) nodes and saves that archive under the name given as the first parameter.
The third parameter CustomFileType can be used if the schema defines a type inheriting from File and we want the archive to be of that type.

Example

${create_archive("logs.zip", find("Folder", "name", "logs"))}
${{Structr.createArchive("logs.zip", Structr.find("Folder", "name", "logs"))}}

Search results for "create_archive()"

create_archive()

Creates and returns a ZIP archive with the given file (and folder) nodes and saves that archive under the name given as the first parameter.
The third parameter CustomFileType can be used if the schema defines a type inheriting from File and we want the archive to be of that type.

create_archive(archiveFileName, files[, CustomFileType])