CreatePack()

Syntax

Result = CreatePack(Filename$)
Description
Create a new empty pack file. If 'Result' is 0, the pack file can't be created. The following commands can be used to add data to the pack file:

AddPackFile(): Add and compress a whole file.
AddPackMemory(): Add and compress a memory area.

Once all the write operations have been done ClosePack() should be called. Note: PureBasic automatically close any opened Packs when the program quits.
  ; Create the packed file...
  CreatePack("mycompressedfiles.pak") 
    ; you add your files 
    AddPackFile("Image1.bmp") 
    AddPackFile("Image2.bmp") 
    AddPackFile("mywave1.wav") 
    AddPackFile("mywave2.wav") 
  ClosePack() 

Supported OS

Windows, Linux, MacOS X

<- ClosePack() - Packer Index - NextPackFile() ->