Compression adapter for Tar
Class constructor
Parameters: | array – (Optional) Options to set |
---|---|
Throws ExceptionExtensionNotLoadedException: | |
if Archive_Tar component not available |
Sets the archive to use for de-/compression
Parameters: | string – Archive to use |
---|---|
Return type: | Tar |
Sets the target path to use
Parameters: | string – |
---|---|
Return type: | Tar |
Throws : | ExceptionInvalidArgumentException if target path does not exist |
Compression mode to use
Either Gz or Bz2.
Parameters: | string – |
---|---|
Return type: | Tar |
Throws : | ExceptionInvalidArgumentException for invalid $mode values |
Throws : | ExceptionExtensionNotLoadedException if bz2 mode selected but extension not loaded |
Throws : | ExceptionExtensionNotLoadedException if gz mode selected but extension not loaded |
Compresses the given content
Parameters: | string – |
---|---|
Return type: | string |
Throws : | ExceptionRuntimeException if unable to create temporary file |
Throws : | ExceptionRuntimeException if unable to create archive |
Decompresses the given content
Parameters: | string – |
---|---|
Return type: | string |
Throws : | ExceptionRuntimeException if unable to find archive |
Throws : | ExceptionRuntimeException if error occurs decompressing archive |