Add files to existing ZIP archive.
Example:
# Example for zip_add
zip_create("/tmp/za_test.zip", [])
write_file("/tmp/za_test.txt", "hello")
zip_add("/tmp/za_test.zip", ["/tmp/za_test.txt"])
Create ZIP archive from list of files.
Example:
# Example for zip_create
zip_create("/tmp/za_test.zip", [])
Create ZIP archive from directory contents.
Example:
# Example for zip_create_from_dir
d = temp_dir("za-zip-")
write_file(d + "/a.txt", "hello")
zip_create_from_dir("/tmp/za_test_dir_temp.zip", d)
Extract ZIP archive to destination directory.
Example:
# Example for zip_extract
zip_create("/tmp/za_test.zip", [])
write_file("/tmp/za_test.txt", "hello")
zip_add("/tmp/za_test.zip", ["/tmp/za_test.txt"])
zip_extract("/tmp/za_test.zip", "/tmp/za_zip_out")
Extract specific files from ZIP archive to destination directory.
Example:
# Example for zip_extract_file
zip_create("/tmp/za_test.zip", [])
write_file("/tmp/za_test.txt", "hello")
zip_add("/tmp/za_test.zip", ["/tmp/za_test.txt"])
zip_extract_file("/tmp/za_test.zip", ["/tmp/za_test.txt"], "/tmp/za_zip_single.txt")
List contents of ZIP archive.
Example:
# Example for zip_list
zip_create("/tmp/za_test.zip", [])
write_file("/tmp/za_test.txt", "hello")
zip_add("/tmp/za_test.zip", ["/tmp/za_test.txt"])
println zip_list("/tmp/za_test.zip")
Remove files from ZIP archive.
Example:
# Example for zip_remove
zip_create("/tmp/za_test.zip", [])
write_file("/tmp/za_test.txt", "hello")
zip_add("/tmp/za_test.zip", ["/tmp/za_test.txt"])
zip_remove("/tmp/za_test.zip", ["/tmp/za_test.txt"])