cfzipparam
Provides additional information to the cfzip tag. The cfzipparam tag is always a child tag of the cfzip tag.
<cfzipparam>
cfzipparam();
Attribute Reference
charset string
Default: encoding of the host machine
encoding of the host machine
Converts string content into binary data before putting it into a ZIP or JAR file.Used only when cfzip action="zip" and the cfzipparam content is a string
Values:
JISRFC1345UTF-16
content string
Content written to the ZIP or JAR entry.Used only when cfzip action="zip". Valid content data types are binary and string. If you specify the content attribute, you must specify the entrypath attribute.
entrypath string
Pathname used: For cfzip action="zip", it is the entrypath used. This is valid only when the source is a file. The entrypath creates a subdirectory within the ZIP or JAR file. For cfzip action="unzip", it is the pathname to unzip. For cfzip action="delete", it is the pathname to delete from the ZIP or JAR file.
filter string
File filter applied to the action. For example, for the zip action, all the files in the source directory matching the filter are zipped.
prefix string
String added as a prefix to the ZIP or JAR entry.Used only when cfzip action="zip".
recurse boolean
Default: true
true
Recurse the directory to be zipped, unzipped, or deleted, as specified by the cfzip parent tag.
Values:
truefalse
source string
Source directory or file.Used only when cfzip action="zip". Specified file(s) are added to the ZIP or JAR file: If you specify source attribute for the cfzip tag, the cfzipparam source is relative to it. If you do not specify a source attribute for the cfzip tag, the cfzipparam source must be an absolute path.
Compatibility
BoxLang:
Version 1.0.0+
<bx:zip> in BoxLang Examples Sample code using the cfzipparam tag
Adding the contents of a folder to a zip
var fileList = directoryList(expandPath('/'), false, 'path', '*.jpg');
cfzip( file = 'allJPGs.zip' ) {
fileList.each((zipFile)=>{
cfzipparam( source = zipFile );
})
}
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/cfzipparam