API - XOOPS 2.5.11 Beta 2
By monxoops.fr
Zipfile Class Reference

Public Member Functions

 unix2DosTime ($unixtime=0)
 
 addFile ($data, $name, $time=0)
 
 file ()
 

Data Fields

 $datasec = array()
 
 $ctrl_dir = array()
 
 $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"
 
 $old_offset = 0
 

Member Function Documentation

◆ addFile()

addFile (   $data,
  $name,
  $time = 0 
)

Adds "file" to archive

Parameters
string$datafile contents
string$namename of the file in the archive (may contains the path)
integer$timethe current timestamp @access public

◆ file()

file ( )

Dumps out file

Returns
string the zipped file @access public

◆ unix2DosTime()

unix2DosTime (   $unixtime = 0)

Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).

Parameters
int$unixtimethe current Unix timestamp
Returns
integer the current date in a four byte DOS format @access private

Field Documentation

◆ $ctrl_dir

array $ctrl_dir = array()

Central directory

◆ $datasec

array $datasec = array()

Array to store compressed data

◆ $eof_ctrl_dir

string $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"

End of central directory record

◆ $old_offset

integer $old_offset = 0

Last offset position


The documentation for this class was generated from the following file: