filesDir = $files.getFilesDir() src = $files.buildFile { |fileBuilder| fileBuilder.setPath(filesDir, "tmp/abc.txt") } src.writeText("hello world", "UTF-8") dest = $files.buildFile { |fileBuilder| fileBuilder.setPath(filesDir, "tmp/abc.zip") } $console.log($files.zipFile(src, dest, nil)) $console.log(dest.exists() && dest.isFile()) unzipDir = $files.buildFile { |fileBuilder| fileBuilder.setPath(filesDir, "tmp/abc") } $console.log($files.unzipFile(dest, unzipDir, nil)) $console.log(unzipDir.exists() && unzipDir.isDirectory()) src.delete() dest.delete() unzipDir.deleteRecursively()