Login +

Reference Guide / SLS_Tar

SLS_Tar1 is a class, originally developed by Josh Barger <joshb@npt.com>, allowing manipulation of TAR archives.

Accessibility

At Controller level, you can access it directly by instantiating the class:

$tar = new SLS_Tar();

Class methods

- To open a TAR file, use the openTAR() function:

$tar->openTAR($filename);

- To add a directory to the current archive, use the addDirectory() function:

$tar->addDirectory($directory);

- To add a file to the current archive, use the addFile() function:

$tar->addFile($file);

- To remove a directory to the current archive, use the removeDirectory() function:

$tar->removeDirectory($directory);

- To delete a file in the current archive, use the removeFile() function:

$tar->removeFile($file);

- To save the current TAR, use the saveTar() function:

$tar->saveTar();

- To create a new TAR from current data, use the toTar() function:

$tar->toTar($filename);

References

  1. SLS_Tar - Tool SLS_Tar - Tar Treatment