A couple of zip file additions
-
While working on Rhapsody's downloader I was needing to know more about the zip files I'm extracting, so I've made a couple of additions to the scripting API.
-
I've added
File.getZippedItemList
. This will return an array that contains the filenames of all files in the zip file (including within folders). -
I've added a ZipFile entry to the
obj
within theextractZip
callback function. This contains the name of the zip file that is being unzipped.
-
-
@d-healey Great addition. So the user doesn’t need to have Winzip installed on his computer to unzip, right?
-
@orange Correct, unzipping is built into every OS for a long time, so a user should never need WinZip unless they're on an ancient OS.
Unzipping within HISE has been available for a few years now. Here's the docs - https://docs.hise.dev/scripting/scripting-api/file/index.html#extractzipfile
I've just added a couple of additions to make some stuff I was doing a little easier and I think these will benefit other people too.
-
@orange no. Zip is integrated in the systems by default. Any other format and it's questionable.
You could ship the 7zip exe if the license permits and call it with BackgroundTask.
You can also use BackgroundTask to extract files if you're running into the size issues using the JUCE/HISE unzip method.