Package zeroinstall :: Package zerostore :: Module unpack
[frames] | no frames]

Module unpack

source code

Unpacking archives of various formats.

Functions
 
recent_gnu_tar() source code
 
type_from_url(url)
Guess the MIME type for this resource based on its URL.
source code
 
check_type_ok(mime_type)
Check we have the needed software to extract from an archive of the given type.
source code
 
unpack_archive_over(url, data, destdir, extract=None, type=None, start_offset=0)
Like unpack_archive, except that we unpack to a temporary directory first and then move things over, checking that we're not following symlinks at each stage.
source code
 
unpack_archive(url, data, destdir, extract=None, type=None, start_offset=0)
Unpack stream 'data' into directory 'destdir'.
source code
 
extract_deb(stream, destdir, extract=None, start_offset=0) source code
 
extract_rpm(stream, destdir, extract=None, start_offset=0) source code
 
extract_cab(stream, destdir, extract, start_offset=0) source code
 
extract_zip(stream, destdir, extract, start_offset=0) source code
 
extract_tar(stream, destdir, extract, decompress, start_offset=0) source code
Function Details

recent_gnu_tar()

source code 

Deprecated: should be private

type_from_url(url)

source code 

Guess the MIME type for this resource based on its URL. Returns None if we don't know what it is.

check_type_ok(mime_type)

source code 

Check we have the needed software to extract from an archive of the given type.

Raises:

unpack_archive_over(url, data, destdir, extract=None, type=None, start_offset=0)

source code 

Like unpack_archive, except that we unpack to a temporary directory first and then move things over, checking that we're not following symlinks at each stage. Use this when you want to unpack an unarchive into a directory which already has stuff in it.

Since: 0.28

unpack_archive(url, data, destdir, extract=None, type=None, start_offset=0)

source code 

Unpack stream 'data' into directory 'destdir'. If extract is given, extract just that sub-directory from the archive. Works out the format from the name.

extract_cab(stream, destdir, extract, start_offset=0)

source code 

Since: 0.24