Name

makeZip — These methods will create a Zip archive containing the contents of a specified folder.

Overview

These methods will create a Zip archive containing the contents of a specified folder.

Syntax

void makeZip ( String zipFilename , String file ) 

The command has the following arguments:

zipFilename

The name of the Zip archive file to be created.

file

The name of the file or directory to be added.

Description

This method will save a file or folder into a Zip file. The files stored in the archive will have the complete directory path from the current working directory. For example, if the folder to be saved is named 'workspace/scenarioA', then all of the files in the archive will contain the prefix 'workspace/scenarioA/'.

Syntax

void makeZip ( String zipFilename , String dir , String file ) 

The command has the following arguments:

zipFilename

The name of the file to be created.

dir

The directory to change to before adding the file.

file

The name of the file or directory to be added.

Description

This method will save a file or folder into a Zip file. Before The files to be added will be taken from the specified directory. The name of the directory will not be added to the names in the archive. For example, if the directory is 'workspace' and the folder to add is 'scenario1', then the files in the archive will be prefixed with 'scenario1/'.

Syntax

void makeZip ( String zipFilename , String dir , String [ ] files ) 

The command has the following arguments:

zipFilename

The name of the file to be created.

dir

The directory to change to before adding the file.

files

An array of files or directories to be added.

Description

This method will save a file or folder into a Zip file. Before The files to be added will be taken from the specified directory. The name of the directory will not be added to the names in the archive. For example, if the directory is 'workspace' and the folder to add is 'scenario1', then the files in the archive will be prefixed with 'scenario1/'.