XOOPS
2.6.0
|
Public Member Functions | |
addDirectory ($dirname) | |
addFile ($filename, $binary=false) | |
appendTar ($filename) | |
containsDirectory ($dirname) | |
containsFile ($filename) | |
getDirectory ($dirname) | |
getFile ($filename) | |
openTAR ($filename) | |
removeDirectory ($dirname) | |
removeFile ($filename) | |
saveTar () | |
toTar ($filename, $useGzip) | |
toTarOutput ($filename, $useGzip) | |
Public Attributes | |
$directories | |
$filename | |
$files | |
$isGzipped | |
$numDirectories | |
$numFiles | |
$tar_file | |
Private Member Functions | |
__computeUnsignedChecksum ($bytestring) | |
__generateTAR () | |
__parseNullPaddedString ($string) | |
__parseTar () | |
__readTar ($filename= '') | |
Definition at line 91 of file class.tar.php.
|
private |
*#@- Computes the unsigned Checksum of a file's header to try to ensure valid file
string | $bytestring |
Definition at line 125 of file class.tar.php.
References $i.
Referenced by __generateTAR(), and __parseTar().
|
private |
Generates a TAR file from the processed data
Definition at line 280 of file class.tar.php.
References $header, $i, and __computeUnsignedChecksum().
|
private |
Converts a NULL padded string to a non-NULL padded string
string | $string |
Definition at line 145 of file class.tar.php.
Referenced by __parseTar().
|
private |
This function parses the current TAR file
$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 157 of file class.tar.php.
References __computeUnsignedChecksum(), and __parseNullPaddedString().
Referenced by __readTar().
|
private |
Read a non gzipped tar file in for processing.
string | $filename | full filename |
Definition at line 250 of file class.tar.php.
References $filename, and __parseTar().
Referenced by appendTar(), and openTAR().
tar::addDirectory | ( | $dirname | ) |
Add a directory to this tar archive
string | $dirname |
Definition at line 481 of file class.tar.php.
References $dirname, and XoopsLoad\fileExists().
tar::addFile | ( | $filename, | |
$binary = false |
|||
) |
Add a file to the tar archive
string | $filename | |
boolean | $binary | Binary file? |
Definition at line 508 of file class.tar.php.
References $filename, containsFile(), and XoopsLoad\fileExists().
tar::appendTar | ( | $filename | ) |
Appends a tar file to the end of the currently opened tar file.
string | $filename |
Definition at line 393 of file class.tar.php.
References $filename, __readTar(), and XoopsLoad\fileExists().
tar::containsDirectory | ( | $dirname | ) |
Check if this tar archive contains a specific directory
string | $dirname |
Definition at line 463 of file class.tar.php.
References $dirname.
tar::containsFile | ( | $filename | ) |
Check if this tar archive contains a specific file
string | $filename |
Definition at line 445 of file class.tar.php.
References $filename.
Referenced by addFile().
tar::getDirectory | ( | $dirname | ) |
Retrieves information about a directory in the current tar archive
string | $dirname |
Definition at line 427 of file class.tar.php.
References $dirname.
tar::getFile | ( | $filename | ) |
Retrieves information about a file in the current tar archive
string | $filename |
Definition at line 409 of file class.tar.php.
References $filename.
tar::openTAR | ( | $filename | ) |
Open a TAR file
string | $filename |
Definition at line 366 of file class.tar.php.
References $filename, __readTar(), and XoopsLoad\fileExists().
tar::removeDirectory | ( | $dirname | ) |
Remove a directory from the tar archive
string | $dirname |
Definition at line 570 of file class.tar.php.
References $dirname.
tar::removeFile | ( | $filename | ) |
Remove a file from the tar archive
string | $filename |
Definition at line 550 of file class.tar.php.
References $filename.
tar::saveTar | ( | ) |
Write the currently loaded tar archive to disk
Definition at line 589 of file class.tar.php.
References toTar().
tar::toTar | ( | $filename, | |
$useGzip | |||
) |
tar::toTarOutput | ( | $filename, | |
$useGzip | |||
) |
Sends tar archive to stdout
string | $filename | |
bool | $useGzip | Use GZ compression? |
Definition at line 637 of file class.tar.php.
tar::$directories |
Definition at line 109 of file class.tar.php.
tar::$filename |
*#@+ Unprocessed Archive Information
Definition at line 97 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 108 of file class.tar.php.
tar::$isGzipped |
Definition at line 98 of file class.tar.php.
tar::$numDirectories |
Definition at line 111 of file class.tar.php.
tar::$numFiles |
Definition at line 110 of file class.tar.php.
tar::$tar_file |
Definition at line 99 of file class.tar.php.
Referenced by toTar(), and toTarOutput().