OpenPack()
Syntax
Result = OpenPack(#Pack, Filename$ [, Plugin])Description
Open a previously existing pack file. Before opening a pack file, at least one packer has to be registered with one of the following command: UseZipPacker(), UseLZMAPacker(), UseTarPacker(), UseBriefLZPacker(). Once opened, the pack content can be listed with ExaminePack().
Parameters
#Pack A number to identify pack file to open. #PB_Any can be used as a parameter to auto-generate this number. Filename$ The filename for the pack file to open. Plugin (optional) The plugin to use, if more than one packer plugin has been registered. It can be one of the following value: #PB_PackerPlugin_BriefLZ: use the BriefLZ packer to open the pack file. UseBriefLZPacker() has to be called to have any effect. #PB_PackerPlugin_Zip : use the Zip packer to open the pack file. UseZipPacker() has to be called to have any effect. #PB_PackerPlugin_LZMA : use the LZMA packer to open the pack file. UseLZMAPacker() has to be called to have any effect. #PB_PackerPlugin_Tar : use the Tar packer to open the pack file. UseTarPacker() has to be called to have any effect.
Return value
Returns nonzero if the pack file has been successfully opened, zero otherwise. If #PB_Any was used as the #Pack parameter then the generated pack number is returned.UseZipPacker() ; Open the packed file If OpenPack(0, "mycompressedfiles.zip") ; List all the entries If ExaminePack(0) While NextPackEntry(0) Debug "Name: " + PackEntryName(0) + ", Size: " + PackEntrySize(0) Wend EndIf ClosePack(0) EndIf
See Also
ClosePack(), ExaminePack()
Supported OS
All