Zip
The BoxLang Zip component is a powerful component that allows you to interact with zip/gzip files.
Component Signature
Attributes
Atrribute | Type | Required | Description | Default |
---|---|---|---|---|
|
|
| The action to take: delete, list, read, readBinary, unzip, zip |
|
|
|
| Absolute filepath to the zip/gzip file to be manipulated. Actions: list, read, readBinary, unzip, zip | |
|
|
| Absolute destination directory where the zip/gzip file will be to. If it doesn't exist it will be created for you. Actions: unzip | |
|
|
| This can be a regular expression (*.txt) or a BoxLang Closure/Lambda ((path) => path.endsWith(".txt")) that will be used to filter the files. Actions: delete, list, unzip, zip | |
|
|
| Zip entry path or an array of entry paths on which the action is performed. Actions: delete, list, read, readBinary, unzip | |
|
|
| Valid Java Charset to use when reading the contents of a file inside a zip file. Default is the machine's default charset. Actions: read, readBinary | |
|
|
|
| |
|
|
| Whether to overwrite the destination file(s) if it already exists when zipping/unzipping. Default is false. Actions: zip, unzip |
|
|
|
| The prefix to add to the files when zipping files, this is the directory name to store files in. Not used by default. Actions: zip | |
|
|
| Whether to recurse into subdirectories when listing/zipping/unzipping. Default is true. Actions: list, zip, unzip |
|
|
|
| If false, the list action will return an array of structs with all kinds of information about the entries. If true, it will return a flat list of strings with the path of the entries. Default is false. Actions: list |
|
|
|
| The absolute path to the source directory to be zipped. Actions: zip | |
|
|
| The name of the variable to store the read content in |
Examples
Last updated