Class icms_file_TarFileHandler
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!
Methods summary
public
|
#
__construct( )
Class Constructor -- Does nothing...
Class Constructor -- Does nothing...
|
public
boolean
|
#
openTAR( string $filename )
Open a TAR file
Parameters
Returns
boolean
|
public
boolean
|
#
appendTar( string $filename )
Appends a tar file to the end of the currently opened tar file.
Appends a tar file to the end of the currently opened tar file.
Parameters
Returns
boolean
|
public
string
|
#
getFile( string $filename )
Retrieves information about a file in the current tar archive
Retrieves information about a file in the current tar archive
Parameters
Returns
string FALSE on fail
|
public
string
|
#
getDirectory( string $dirname )
Retrieves information about a directory in the current tar archive
Retrieves information about a directory in the current tar archive
Parameters
Returns
string FALSE on fail
|
public
boolean
|
#
containsFile( string $filename )
Check if this tar archive contains a specific file
Check if this tar archive contains a specific file
Parameters
Returns
boolean
|
public
boolean
|
#
containsDirectory( string $dirname )
Check if this tar archive contains a specific directory
Check if this tar archive contains a specific directory
Parameters
Returns
boolean
|
public
boolean
|
#
addDirectory( string $dirname )
Add a directory to this tar archive
Add a directory to this tar archive
Parameters
Returns
boolean
|
public
boolean
|
#
addFile( string $filename, boolean $binary = false )
Add a file to the tar archive
Add a file to the tar archive
Parameters
- $filename
- $binary
- Binary file?
Returns
boolean
|
public
boolean
|
#
removeFile( string $filename )
Remove a file from the tar archive
Remove a file from the tar archive
Parameters
Returns
boolean
|
public
boolean
|
#
removeDirectory( string $dirname )
Remove a directory from the tar archive
Remove a directory from the tar archive
Parameters
Returns
boolean
|
public
boolean
|
#
saveTar( )
Write the currently loaded tar archive to disk
Write the currently loaded tar archive to disk
Returns
boolean
|
public
boolean
|
#
toTar( string $filename, boolean $useGzip )
Saves tar archive to a different file than the current file
Saves tar archive to a different file than the current file
Parameters
- $filename
- $useGzip
- Use GZ compression?
Returns
boolean
|
public
string
|
#
toTarOutput( string $filename, boolean $useGzip )
Sends tar archive to stdout
Sends tar archive to stdout
Parameters
- $filename
- $useGzip
- Use GZ compression?
Returns
string
|
Properties summary
public
|
$files
Processed Archive Information
Processed Archive Information
|
|
public
|
$numFiles
|
|