File Compression

14 / Feb / 2011 by Anshul Sharma 0 comments

Creating a zip file using AntBuilder.

        def ant = new AntBuilder()
        ant.zip(
                destfile: destPath,
                basedir: basePath,
                includes: includeFiles, // Comma seperated file names
                excludes: excludeFiles, // Comma seperated file names
                level: 9     // maximum compression
        )

 
        def ant = new AntBuilder();
        ant.unzip(
		src: srcPath,
                dest: destDir,
                overwrite: "true"
	)

 

Hope this helped!

Cheers!

Anshul Sharma

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *