cfzip
8
3

Overview ColdFusion Open BlueDragon Lucee

Manipulates ZIP and JavaTM Archive (JAR) files. In addition to the basic zip and unzip functions, use the cfzip tag to delete entries from an archive, filter files, read files in binary format, list the contents of an archive, and specify an entrypath used in an executable JAR file.

Attributes

Name Required Type Default Description
8
3
action No String zip The action to take. Must be one of the following: delete list read readBinary unzip zip If you do not specify an action, ColdFusion applies the default action, zip. (optional)
8
3
charset No String The character set used to translate the ZIP or JAR entry into a text string. Examples of character sets are: JIS RFC1345 UTF-16 (optional, default=encoding of the host machine)
compressionlevel No The compression level to apply when creating a zip file. The range is 0 (no compression) to 9 (maximum compression). DEFAULT:8
8
3
destination No String Destination directory where the ZIP or JAR file is extracted. (optional)
11
encryptionAlgorithm No String AES-256 Encryption algorithm to be used to encrypt the files when a password is given
8
3
entrypath No String Pathname on which the action is performed. (optional)
8
3
file No String Absolute pathname of the file on which the action is performed. For example, the full pathname of the ZIP file: c:\temp\log.zip. If you do not specify the full pathname (for example, file="log.zip"), ColdFusion creates the file in a temporary directory. You can use the GetTempDirectory function to access the ZIP or JAR file. (required)
8
3
filter No String File filter applied to the action. The action applies to all files in the pathname specified that match the filter. (optional)
4
filterdelimiters No Optional when passing a filter pattern. This value is used as a delimiter for the patterns. Default is the pipe "|" character.
flatten No When extracting the contents of an existing zip file, the flatten attribute indicates whether or not to retain the directory structure of the zip file. A value of true indicates the directory structure will not be retained, while a value of false indicates that the directory structure will be retained. DEFAULT:FALSE
8
3
name No String Record set name in which the result of the list action is stored. The record set columns are: name: filename of the entry in the JAR file. For example, if the entry is help/docs/index.htm, the name is index.htm. directory: directory containing the entry. For the example above, the directory is help/docs. You can obtain the full entry name by concatenating directory and name. If an entry is at the root level, the directory is empty (''). size: uncompressed size of the entry, in bytes. compressedSize: compressed size of the entry, in bytes. type: type of entry (directory or file). dateLastModified: last modified date of the entry, cfdate object. comment: any comment, if present, for the entry. crc: crc-32 checksum of the uncompressed entry data. (required)
newpath No If the source attribute is a file as opposed to a directory, the newpath attribute can be used to specify a new path for the file being included in the created zip file. If the source attribute is a directory the newpath attribute is ignored.
8
3
overwrite No Boolean unzip: Specifies whether to overwrite the extracted files: yes: if the extracted file already exists at the destination specified, the file is overwritten. no: if the extracted file already exists at the destination specified, the file is not overwritten and that entry is not extracted. The remaining entries are extracted. zip: Specifies whether to overwrite the contents of a ZIP or JAR file: yes: overwrites all of the content in the ZIP or JAR file if it exists. no: updates existing entries and adds new entries to the ZIP or JAR file if it exists. (optional, default=no)
11
password No String Password with which to archive the files
8
3
prefix No String String added as a prefix to the ZIP or JAR entry. The string is the name of a subdirectory in which the entries are added. (optional)
8
3
recurse No Boolean Specifies whether the action applies to subdirectories: yes: includes subdirectories. no: does not include subdirectories. (optional, default=yes)
8
3
showDirectory No Boolean yes: lists the directories. no: does not list directories. (optional, default= no)
8
3
source No String Source directory to be zipped. Not required if cfzipparam is specified. (required)
8
3
storePath No Boolean zip: Specifies whether pathnames are stored in the ZIP or JAR file: yes: pathnames of entries are stored in the ZIP or JAR file. no: pathnames of the entries are not stored in the ZIP or JAR file. All the files are placed at the root level. In case of a name conflict, the last file in the iteration is added. unzip: Specifies whether files are stored at the entrypath: yes: the files are extracted to the entrypath. no: the entrypath is ignored and all the files are extracted at the root level. (optional, default= yes)
8
3
variable No String Variable in which the read content is stored. (required)
zipfile No The path and file name of the zip file on which the action will be performed.