zip::zip() is used so this is platform independent. It will keep the relative path structure in zip, include folder_path itself so the zip can be extracted directly without need of creating a folder to hold contents. The zip file will be saved to the parent folder of folder_path.

zip_folder(folder_path, zip_name)

Arguments

folder_path

The folder to be compressed

zip_name

The name of zip

Value

The absolute path of result zip file