Tar
class Tar extends Tar (View source)
Defines an archiver implementation for .tar files.
Properties
| protected ArchiveTar | $tar | The underlying ArchiveTar instance that does the heavy lifting. |
from Tar |
Methods
Details
in
Tar at line 27
__construct(string $file_path)
Constructs a Tar object.
in
Tar at line 34
$this
add(string $file_path)
Adds the specified file or directory to the archive.
in
Tar at line 43
$this
remove($file_path)
Removes the specified file from the archive.
in
Tar at line 55
$this
extract(string $path, array $files = [])
Extracts multiple files in the archive to the specified path.
in
Tar at line 69
array
listContents()
Lists all files in the archive.
in
Tar at line 87
Archive_Tar
getArchive()
Retrieves the tar engine itself.
In some cases it may be necessary to directly access the underlying Archive_Tar object for implementation-specific logic. This is for advanced use only as it is not shared by other implementations of ArchiveInterface.