CreatePack()
语法
Result = CreatePack(#Pack, Filename$ [, PluginID])概要
Create a new empty pack file. If the file already exists, it will be replaced with a new empty file. Before creating a pack file, at least one packer has to be registered with one of the following command: UseZipPacker(), UseBriefLZPacker().
参数
#Pack A number to identify the new pack file. #PB_Any can be used as a parameter to auto-generate this number. Filename$ The filename for the new pack file. PluginID (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 create the pack file. UseBriefLZPacker() has to be called to have any effect. #PB_PackerPlugin_Zip : use the Zip packer to create the pack file. UseZipPacker() has to be called to have any effect.
返回值
Returns nonzero if the pack file has been successfully created, zero otherwise. If #PB_Any was used as the #Pack parameter then the generated pack number is returned.UseZipPacker() ; Create the packed file If CreatePack(0, "mycompressedfiles.zip") ; add your files AddPackFile(0, "Image1.bmp", "Image1.bmp") AddPackFile(0, "Image2.bmp", "Image2.bmp") AddPackFile(0, "mywave1.wav", "mywave1.wav") AddPackFile(0, "mywave2.wav", "mywave2.wav") ClosePack(0) EndIf
参阅
ClosePack()
已支持操作系统
所有