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

Public Member Functions

 __construct ()
 
 __computeUnsignedChecksum ($bytestring)
 
 __parseNullPaddedString ($string)
 
 __parseTar ()
 
 __readTar ($filename='')
 
 __generateTar ()
 
 openTAR ($filename)
 
 appendTar ($filename)
 
 getFile ($filename)
 
 getDirectory ($dirname)
 
 containsFile ($filename)
 
 containsDirectory ($dirname)
 
 addDirectory ($dirname)
 
 addFile ($filename, $binary=false)
 
 removeFile ($filename)
 
 removeDirectory ($dirname)
 
 saveTar ()
 
 toTar ($filename, $useGzip)
 
 toTarOutput ($filename, $useGzip)
 

Data Fields

 $filename
 
 $isGzipped
 
 $tar_file
 
 $files
 
 $directories
 
 $numFiles
 
 $numDirectories
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

*#- Class Constructor – Does nothing...

Member Function Documentation

◆ __computeUnsignedChecksum()

__computeUnsignedChecksum (   $bytestring)

Computes the unsigned Checksum of a file's header to try to ensure valid file

Parameters
string$bytestring
Returns
int|string @access private
Here is the caller graph for this function:

◆ __generateTar()

__generateTar ( )

Generates a TAR file from the processed data

Returns
bool always TRUE @access private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __parseNullPaddedString()

__parseNullPaddedString (   $string)

Converts a NULL padded string to a non-NULL padded string

Parameters
string$string
Returns
string @access private
Here is the caller graph for this function:

◆ __parseTar()

__parseTar ( )

This function parses the current TAR file

Returns
bool always TRUE @access private

Unused Header Information

$activeFile["typeflag"] = substr($this->tar_file,$main_offset + 156,1); $activeFile["linkname"] = substr($this->tar_file,$main_offset + 157,100); $activeFile["magic"] = substr($this->tar_file,$main_offset + 257,6); $activeFile["version"] = substr($this->tar_file,$main_offset + 263,2); $activeFile["devmajor"] = substr($this->tar_file,$main_offset + 329,8); $activeFile["devminor"] = substr($this->tar_file,$main_offset + 337,8); $activeFile["prefix"] = substr($this->tar_file,$main_offset + 345,155); $activeFile["endheader"] = substr($this->tar_file,$main_offset + 500,12);

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __readTar()

__readTar (   $filename = '')

Read a non gzipped tar file in for processing.

Parameters
string$filenamefull filename
Returns
bool always TRUE @access private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addDirectory()

addDirectory (   $dirname)

Add a directory to this tar archive

Parameters
string$dirname
Returns
bool

◆ addFile()

addFile (   $filename,
  $binary = false 
)

Add a file to the tar archive

Parameters
string$filename
boolean$binaryBinary file?
Returns
bool
Here is the call graph for this function:

◆ appendTar()

appendTar (   $filename)

Appends a tar file to the end of the currently opened tar file.

Parameters
string$filename
Returns
bool
Here is the call graph for this function:

◆ containsDirectory()

containsDirectory (   $dirname)

Check if this tar archive contains a specific directory

Parameters
string$dirname
Returns
bool

◆ containsFile()

containsFile (   $filename)

Check if this tar archive contains a specific file

Parameters
string$filename
Returns
bool
Here is the caller graph for this function:

◆ getDirectory()

getDirectory (   $dirname)

Retrieves information about a directory in the current tar archive

Parameters
string$dirname
Returns
string|false FALSE on fail

◆ getFile()

getFile (   $filename)

Retrieves information about a file in the current tar archive

Parameters
string$filename
Returns
string|false FALSE on fail

◆ openTAR()

openTAR (   $filename)

Open a TAR file

Parameters
string$filename
Returns
bool
Here is the call graph for this function:

◆ removeDirectory()

removeDirectory (   $dirname)

Remove a directory from the tar archive

Parameters
string$dirname
Returns
bool

◆ removeFile()

removeFile (   $filename)

Remove a file from the tar archive

Parameters
string$filename
Returns
bool

◆ saveTar()

saveTar ( )

Write the currently loaded tar archive to disk

Returns
bool
Here is the call graph for this function:

◆ toTar()

toTar (   $filename,
  $useGzip 
)

Saves tar archive to a different file than the current file

Parameters
string$filename
bool$useGzipUse GZ compression?
Returns
bool
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toTarOutput()

toTarOutput (   $filename,
  $useGzip 
)

Sends tar archive to stdout

Parameters
string$filename
bool$useGzipUse GZ compression?
Returns
string|false
Here is the call graph for this function:

Field Documentation

◆ $directories

$directories

◆ $filename

$filename

*#+ Unprocessed Archive Information

◆ $files

$files

*#- *#+ Processed Archive Information

◆ $isGzipped

$isGzipped

◆ $numDirectories

$numDirectories

◆ $numFiles

$numFiles

◆ $tar_file

$tar_file

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