Example 2

Put some text in the gzip compressed file f.gz.

Groovy

import org.entityfs.util.CharSequenceReadableFile import org.schmant.support.FutureFile import org.schmant.task.io.gzip.GZipTF new GZipTF(). setSource(new CharSequenceReadableFile( "NOTE:\n" + "=====\n" + "If you can read me, you have successfully decompressed this file.")). setTarget(new FutureFile(dir, "f.gz")).run()

JavaScript

new GZipTF(). setSource(new CharSequenceReadableFile( "NOTE:\n" + "=====\n" + "If you can read me, you have successfully decompressed this file.")). setTarget(new FutureFile(dir, "f.gz")).run();


* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.