XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
tar Class Reference

Public Member Functions

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

Public Attributes

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

Detailed Description

Definition at line 93 of file class.tar.php.

Member Function Documentation

tar::__computeUnsignedChecksum (   $bytestring)

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

Parameters
string$bytestringprivate

Definition at line 133 of file class.tar.php.

References $i.

Referenced by __generateTAR(), and __parseTar().

Here is the caller graph for this function:

tar::__generateTAR ( )

Generates a TAR file from the processed data

Returns
bool always TRUE private

Definition at line 286 of file class.tar.php.

References $i, and __computeUnsignedChecksum().

Here is the call graph for this function:

tar::__parseNullPaddedString (   $string)

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

Parameters
string$string
Returns
string private

Definition at line 153 of file class.tar.php.

Referenced by __parseTar().

Here is the caller graph for this function:

tar::__parseTar ( )

This function parses the current TAR file

Returns
bool always TRUE 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);

Definition at line 165 of file class.tar.php.

References __computeUnsignedChecksum(), and __parseNullPaddedString().

Referenced by __readTar().

Here is the call graph for this function:

Here is the caller graph for this function:

tar::__readTar (   $filename = '')

Read a non gzipped tar file in for processing.

Parameters
string$filenamefull filename
Returns
bool always TRUE private

Definition at line 256 of file class.tar.php.

References $filename, and __parseTar().

Referenced by appendTar(), and openTAR().

Here is the call graph for this function:

Here is the caller graph for this function:

tar::addDirectory (   $dirname)

Add a directory to this tar archive

Parameters
string$dirname
Returns
bool

Definition at line 486 of file class.tar.php.

References $dirname.

tar::addFile (   $filename,
  $binary = false 
)

Add a file to the tar archive

Parameters
string$filename
boolean$binaryBinary file?
Returns
bool

Definition at line 513 of file class.tar.php.

References $filename, and containsFile().

Here is the call graph for this function:

tar::appendTar (   $filename)

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

Parameters
string$filename
Returns
bool

Definition at line 398 of file class.tar.php.

References $filename, and __readTar().

Here is the call graph for this function:

tar::containsDirectory (   $dirname)

Check if this tar archive contains a specific directory

Parameters
string$dirname
Returns
bool

Definition at line 468 of file class.tar.php.

References $dirname.

tar::containsFile (   $filename)

Check if this tar archive contains a specific file

Parameters
string$filename
Returns
bool

Definition at line 450 of file class.tar.php.

References $filename.

Referenced by addFile().

Here is the caller graph for this function:

tar::getDirectory (   $dirname)

Retrieves information about a directory in the current tar archive

Parameters
string$dirname
Returns
string FALSE on fail

Definition at line 432 of file class.tar.php.

References $dirname.

tar::getFile (   $filename)

Retrieves information about a file in the current tar archive

Parameters
string$filename
Returns
string FALSE on fail

Definition at line 414 of file class.tar.php.

References $filename.

tar::openTAR (   $filename)

Open a TAR file

Parameters
string$filename
Returns
bool

Definition at line 372 of file class.tar.php.

References $filename, and __readTar().

Here is the call graph for this function:

tar::removeDirectory (   $dirname)

Remove a directory from the tar archive

Parameters
string$dirname
Returns
bool

Definition at line 575 of file class.tar.php.

References $dirname.

tar::removeFile (   $filename)

Remove a file from the tar archive

Parameters
string$filename
Returns
bool

Definition at line 555 of file class.tar.php.

References $filename.

tar::saveTar ( )

Write the currently loaded tar archive to disk

Returns
bool

Definition at line 594 of file class.tar.php.

References toTar().

Here is the call graph for this function:

tar::tar ( )

*#@- Class Constructor – Does nothing...

Definition at line 121 of file class.tar.php.

tar::toTar (   $filename,
  $useGzip 
)

Saves tar archive to a different file than the current file

Parameters
string$filename
bool$useGzipUse GZ compression?
Returns
bool

Definition at line 611 of file class.tar.php.

References $file, $filename, and $tar_file.

Referenced by saveTar().

Here is the caller graph for this function:

tar::toTarOutput (   $filename,
  $useGzip 
)

Sends tar archive to stdout

Parameters
string$filename
bool$useGzipUse GZ compression?
Returns
string

Definition at line 642 of file class.tar.php.

References $file, $filename, and $tar_file.

Member Data Documentation

tar::$directories

Definition at line 111 of file class.tar.php.

tar::$filename

*#@+ Unprocessed Archive Information

Definition at line 99 of file class.tar.php.

Referenced by __readTar(), addFile(), appendTar(), containsFile(), getFile(), openTAR(), removeFile(), toTar(), and toTarOutput().

tar::$files

*#@- *#@+ Processed Archive Information

Definition at line 110 of file class.tar.php.

tar::$isGzipped

Definition at line 100 of file class.tar.php.

tar::$numDirectories

Definition at line 113 of file class.tar.php.

tar::$numFiles

Definition at line 112 of file class.tar.php.

tar::$tar_file

Definition at line 101 of file class.tar.php.

Referenced by toTar(), and toTarOutput().


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