Tuesday, October 16, 2007

Unzip with UTF Support in ColdFusion - Function Updates for v0.2

Due to some shortcommings, here is an update of the "unzipWithUTFSupport" function. The change log is below. You can get the update version at
  • Support for absolute paths relative to the root of the web site
    Example: destination = "/"
  • Back slashes get converted to forward slashes
    Example: destination = "/test\blah" = "/test/blah"
  • Better support for relative paths:
    - relative to the "destination" if one is specified
    - relative to the name of the zip archive otherwise (which is used as the extract directory name)
  • Support for parent paths (relative to the executing script)
    Example: destination = "../test"
  • Support for absolute paths
    Example: destination = "d:\webroot\test"
  • All possible ways to define a path also apply to the "destination" key in the locationsByFileType structure
    Example: locationsByFileType.jpg.destination = "images\jpg"
  • No need for file type sub structure if you only care for the path where the files will be extracted
    Example: locationsByFileType.xml = "images\jpg"
    Instead of: locationsByFileType.jpg.destination = "images\jpg"
  • Corrected an omission in the build script that prevented all files from being extracted because of lower case or upper case file extensions
  • Renamed "overwriteDestination" to "deleteDestination" and set it to "false" by default

No comments:

Post a Comment

// //]]>