class documentation
class Archive(object):
Undocumented
Static Method | parse |
Given an filename return the basename (filename without the archive and compression extensions), archive format and compression method used. |
Class Variable |
|
Undocumented |
Class Variable |
|
Undocumented |
Given an filename return the basename (filename without the archive and compression extensions), archive format and compression method used.
Parameters | |
filename:string | the name of the file |
Returns | |
tuple of str >>> Archive.parse_filename("abc.tar.gz") ('abc', 'tar', 'gzip') >>> Archive.parse_filename("abc.tar.bz2") ('abc', 'tar', 'bzip2') >>> Archive.parse_filename("abc.def.tbz2") ('abc.def', 'tar', 'bzip2') >>> Archive.parse_filename("abc.def.tar.xz") ('abc.def', 'tar', 'xz') >>> Archive.parse_filename("abc.zip") ('abc', 'zip', None) >>> Archive.parse_filename("abc.lzma") ('abc', None, 'lzma') >>> Archive.parse_filename("abc.tar.foo") ('abc.tar.foo', None, None) >>> Archive.parse_filename("abc") ('abc', None, None) | tuple containing basename, archive format and compression method |