Archive: ezcArchiveGnuTar
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcArchiveGnuTar
|
The ezcArchiveGnuTar class implements the GNU Tar archive format. [
source]
ezcArchiveGnuTar is a subclass from
ezcArchive that provides the common interface, and
ezcArchiveUstarTar that provides the basic Tar implementation.
ezcArchiveGnuTar reads on creation only the first
entry from the archive. When needed next entries are read.
The Gnu Tar algorithm is an extension of Ustar Tar. Gnu has the following extended features compared to Ustar:
- Filenames of unlimited size.
- File size is unlimited.
The current implementation allows only reading from a Gnu archive.
The features of Gnu Tar and Pax Tar are quite similar, although their approach is different.
Parents
ezcArchive
|
--ezcArchiveV7Tar
|
--ezcArchiveUstarTar
|
--ezcArchiveGnuTar
Inherited Constants
From
ezcArchiveV7Tar:
From
ezcArchive:
Inherited Member Variables
From
ezcArchiveV7Tar:
From
ezcArchive:
Method Summary
|
public ezcArchiveGnuTar |
__construct(
$blockFile, [$blockFactor = 20] )
Initializes the Tar and tries to read the first entry from the archive. |
|
public bool |
algorithmCanWrite(
)
Returns false because the TAR_PAX algorithm cannot write (yet). |
|
protected ezcArchiveGnuHeader |
createTarHeader(
[$file = null] )
Creates the a new pax tar header for this class. |
|
public int |
getAlgorithm(
)
Returns the value which specifies a TAR_GNU algorithm. |
Inherited Methods
From
ezcArchiveUstarTar :
From
ezcArchiveV7Tar :
From
ezcArchive :
Methods
__construct
ezcArchiveGnuTar __construct(
$blockFile, [int
$blockFactor = 20] )
Initializes the Tar and tries to read the first entry from the archive.
At initialization it sets the blockFactor to $blockFactor. Each tar archive has always $blockFactor of blocks ( 0, $blockFactor, 2 * $blockFactor, etc ).
The Tar archive works with blocks, so therefore the first parameter expects the archive as a blockFile.
Parameters
| Name |
Type |
Description |
$blockFile |
ezcArchiveBlockFile |
|
$blockFactor |
int |
|
Redefinition of
algorithmCanWrite
bool algorithmCanWrite(
)
Returns false because the TAR_PAX algorithm cannot write (yet).
See also:
isWritable().
Redefinition of
createTarHeader
ezcArchiveGnuHeader createTarHeader(
[string|null
$file = null] )
Creates the a new pax tar header for this class.
This method expects an ezcArchiveBlockFile that points to the header that should be read (and created). If null is given as block file, an empty header will be created.
Parameters
| Name |
Type |
Description |
$file |
string|null |
|
Redefinition of
getAlgorithm
int getAlgorithm(
)
Returns the value which specifies a TAR_GNU algorithm.
Redefinition of
Last updated: Tue, 02 Dec 2008