CreatePack()

Syntax

Result = CreatePack(Filename$)
Description
Create a new empty pack file. If 'Result' equals 0, the pack file can't be created. The following functions 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 completed ClosePack() should be called. Note: PureBasic automatically closes any opened Packs when the program quits.
  ; Create the packed file...
  CreatePack("mycompressedfiles.pak") 
    ; add your files 
    AddPackFile("Image1.bmp") 
    AddPackFile("Image2.bmp") 
    AddPackFile("mywave1.wav") 
    AddPackFile("mywave2.wav") 
  ClosePack() 

Supported OS

All

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