The following functions are available:
new, create, extract, list.
new%opts
Creates a new Arch::Tarball object.
The following parameters can be set via %opts:
tar The name of the tar executable. Defaults to "tar".
file
The filename of the Tarball.
create%opts
Creates a new tarball (tar.gz) from a given directory structure.
create understands the following options:
dir (mandatory)
Specifies the base directory for the tarball. The given directory and recursively its content
will be added to the tarball. The directory's basename will be used as the first and the only
subdirectory in the tarball.
base_name
Allow the programmer to specify a different base directory name for the tarball content than the
basename of dir. In this case, 'cp' process is launched to temporarily rename the last element of
dir.
pipe
When set, create does not create a physical tarball but writes the tarballs content to a newly
created pipe. The pipe is returned by the create method.
Note: Currently the pipe option is mandatory.
extract%opts
Extracts the tarball to a given target directory, specified by dir option. If dir option is not
given, a temporary directory is created that will hold the extracted dirs/files. This directory is
returned.
The file option specifies the tarball file name. It may be given in the constructor instead.
list%opts (not implemented yet)
Returns a list of files and directories in the tarball.