HSLZipLib
https://github.com/theonetruenerd/VenusPackages/blob/main/HSLZipLib.pkg
HSLZipLib is a library that allows you to create zip folders, as well as unzip and extract folders from them. It adds the following four functions:
- UnpackArchive(variable i_strArchiveName, variable i_strPathOutput)
The unpack archive function unzips a zip folder and extracts the contents to the specified location.
- Params i_strArchiveName:
The full name and path to the zip folder you wish to unzip, including the .zip file extension
- Params i_strPathOutput:
The full name and path of the folder you would like to create when extracting the zip file, with no extension
- Returns:
Boolean confirming whether unzipping the archive was successful or not
- Return type:
Boolean
- AddItemToArchive(variable i_strFileOrDirectoryName, variable i_strDirectoryPathInArchive)
This function specifies a file or directory which will be added to the zip file which will be generated with the
PackArchive()
function.- Params i_strFileOrDirectoryName:
The path to the file or directory that you wish to include in the zip folder. File extension required for files, no extension required for folders.
- Params i_strDirectoryPathInArchive:
The path to the desired location of the file within the zip folder.
- Returns:
Boolean confirming whether adding the file or directory to the archive was successful
- Return type:
Boolean
- InitializeArchive(variable i_strArchiveName)
This function initializes whatever archive is specified. It is required to call this function for each archive you are interacting with, in advance of calling any of the otehr functions.
- Params i_strArchiveName:
The name of the desired zip file; can be a file that already exists or one that doesn’t exist yet and will be created
- Returns:
None
- Return type:
N/A
- PackArchive()
This function zips/packs whichever archive was most recently initialized.
- Returns:
Boolean confirming whether zipping the archive was successful or not
- Return type:
Boolean