XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
|
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 | |
tar Class
This class reads and writes Tape-Archive (TAR) Files and Gzip compressed TAR files, which are mainly used on UNIX systems. This class works on both windows AND unix systems, and does NOT rely on external applications!! Woohoo!
Definition at line 23 of file class.tar.php.
__construct | ( | ) |
#- Class Constructor – Does nothing...
Definition at line 45 of file class.tar.php.
__computeUnsignedChecksum | ( | $bytestring | ) |
Computes the unsigned Checksum of a file's header to try to ensure valid file PHP8 Fatal error - Uncaught TypeError: Unsupported operand types: string + int XCL 2.3.x PHP8 fix to add a string to an integer, replace $unsigned_chksum = ''; with $unsigned_chksum = null;
$bytestring |
@access private
Definition at line 59 of file class.tar.php.
__generateTAR | ( | ) |
Generates a TAR file from the processed data
@access private
Definition at line 240 of file class.tar.php.
__parseNullPaddedString | ( | $string | ) |
Converts a NULL padded string to a non-NULL padded string
string | $string |
@access private
Definition at line 83 of file class.tar.php.
__parseTar | ( | ) |
This function parses the current TAR file
@access private
Definition at line 96 of file class.tar.php.
__readTar | ( | $filename = '' | ) |
Read a non gzipped tar file in for processing.
string | $filename | full filename |
@access private
Definition at line 205 of file class.tar.php.
addDirectory | ( | $dirname | ) |
Add a directory to this tar archive
string | $dirname |
Definition at line 460 of file class.tar.php.
addFile | ( | $filename, | |
$binary = false ) |
Add a file to the tar archive
string | $filename | |
bool | $binary | Binary file? |
Definition at line 489 of file class.tar.php.
appendTar | ( | $filename | ) |
Appends a tar file to the end of the currently opened tar file.
string | $filename |
Definition at line 368 of file class.tar.php.
containsDirectory | ( | $dirname | ) |
Check if this tar archive contains a specific directory
string | $dirname |
Definition at line 442 of file class.tar.php.
containsFile | ( | $filename | ) |
Check if this tar archive contains a specific file
string | $filename |
Definition at line 424 of file class.tar.php.
getDirectory | ( | $dirname | ) |
Retrieves information about a directory in the current tar archive
string | $dirname |
Definition at line 405 of file class.tar.php.
getFile | ( | $filename | ) |
Retrieves information about a file in the current tar archive
string | $filename |
Definition at line 386 of file class.tar.php.
openTAR | ( | $filename | ) |
Open a TAR file
string | $filename |
Definition at line 338 of file class.tar.php.
removeDirectory | ( | $dirname | ) |
Remove a directory from the tar archive
string | $dirname |
Definition at line 558 of file class.tar.php.
removeFile | ( | $filename | ) |
Remove a file from the tar archive
string | $filename |
Definition at line 538 of file class.tar.php.
saveTar | ( | ) |
Write the currently loaded tar archive to disk
Definition at line 577 of file class.tar.php.
toTar | ( | $filename, | |
$useGzip ) |
Saves tar archive to a different file than the current file
string | $filename | |
bool | $useGzip | Use GZ compression? |
Definition at line 596 of file class.tar.php.
toTarOutput | ( | $filename, | |
$useGzip ) |
Sends tar archive to stdout
string | $filename | |
bool | $useGzip | Use GZ compression? |
Definition at line 632 of file class.tar.php.
$directories |
Definition at line 37 of file class.tar.php.
$filename |
#+ Unprocessed Archive Information
Definition at line 28 of file class.tar.php.
$files |
#- #+ Processed Archive Information
Definition at line 36 of file class.tar.php.
$isGzipped |
Definition at line 29 of file class.tar.php.
$numDirectories |
Definition at line 39 of file class.tar.php.
$numFiles |
Definition at line 38 of file class.tar.php.
$tar_file |
Definition at line 30 of file class.tar.php.