Tar
Implements ExtractableInterfaceTar format adapter for the Archive package
This class is inspired from and draws heavily in code and concept from the Compress package of The Horde Project http://www.horde.org
| contributor |
Michael Slusarz [email protected] Michael Cochrane [email protected] |
|---|---|
| since |
1.0 |
| package |
Joomla Framework |
Methods
__construct
Create a new Archive object.
__construct(array|\ArrayAccess options = array()) : mixed
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- options
array|\ArrayAccessAn array of options or an object that implements \ArrayAccess
Response
mixed
extract
Extract a ZIP compressed file to a given path
extract(string archive, string destination) : bool
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- archive
stringPath to ZIP archive to extract- destination
stringPath to extract archive into
Response
boolTrue if successful
getTarInfo
Get the list of files/data from a Tar archive buffer.
getTarInfo(string &data) : array
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- data
stringThe Tar archive buffer.
Response
arrayArchive metadata array
KEY: Position in the array VALUES: 'attr' -- File attributes 'data' -- Raw file contents 'date' -- File modification time 'name' -- Filename 'size' -- Original file size 'type' -- File type
isBelow
Check if a path is below a given destination path
isBelow(string destination, string path) : bool
| since |
1.1.12 |
|---|
Arguments
- destination
stringRoot path- path
stringPath to check
Response
bool
isSupported
Tests whether this adapter can unpack files on this computer.
isSupported() : bool
| since |
1.0 |
|---|
Response
boolTrue if supported
Properties
types
Tar file types.
| since |
1.0 |
|---|
Type(s)
array
data
Tar file data buffer
| since |
1.0 |
|---|
Type(s)
string
metadata
Tar file metadata array
| since |
1.0 |
|---|
Type(s)
array
options
Holds the options array.
| since |
1.0 |
|---|
Type(s)
array|\ArrayAccess