l.c.c.tarball : module documentation

Part of lp.codehosting.codeimport

Create and extract tarballs.
Class TarError Raised when the tar command has failed for some reason.
Class NotADirectory Undocumented
Function create_tarball Create a tarball of directory called tarball_name.
Function extract_tarball Extract contents of a tarball.
Function _check_tar_retcode Undocumented
def _check_tar_retcode(retcode):
Undocumented
def create_tarball(directory, tarball_name, filenames=None):
Create a tarball of directory called tarball_name.

This creates a tarball of directory from its parent directory. This means that when untarred, it will create a new directory with the same name as directory. If filenames is not None, then the tarball will be limited to that list of directory entries under directory.

Basically, this is the standard way of making tarballs.

def extract_tarball(tarball_name, directory):
Extract contents of a tarball.

Changes to directory and extracts the tarball at tarball_name.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.