CFZIP: A cursory introduction Jared Rypka-Hauer Adobe Community Expert - ColdFusion
Who Am I? Contributor:Model-GlueColdSpringCFEclipseMember: Adobe Community Experts, formerly Team Macromedia Team Model-Glue Team Fusebox Team Fusion
CFZIP: A cursory look What’s it for? (someone had to ask) It reads, modifies, and writes ZIP-format files Does it to anything else? YES! It works with any zip-format file, so it will work with Java JAR, EAR, and WAR files, as well as any other ZIP-based archive format!
What we’ll cover... Reading/listing contents Creating a new zip file Unzipping an existing zip file Reading one resource at a time Q & A
Basic Syntax That zips up a file or folder to {destination} Other sorts of things require expanded syntax, like...
Read/List Contents Make sure everyone’s still awake! Jump to code...
Read single file entry Reads zip entries as text Reads them in as binary, too! BUMMER: You have to tell it which is which. Expand from example: filters! w00t!
Create a new ZIP file Requirements: Full Moon 1 goat 1 large kettle Water Salt to taste Seriously... jump to code
UNZIP! (no, not THAT unzip...) OK, fine, we’ll just jump to the code then... sheesh.
Other things it can do One/many files at a time: delete entries (filter-capable) “update” (basically an overwrite) list/read are unique - list by filter/read via list Filters can be used with: zipunzipdeletelist Filters don’t work with read or readBinary
Resources New LiveDocs pages for CF8: p.html?content=Tags_u-z_5.html# My blog: MXNA/FullAsAGoog “Goog” is slang for “egg” “Full as a goog” means “chock full” in Australia “Chock full” of Fusioney goodness, that is!