From ed41abb47b8cb8e2c7629a2ce9f3713519084cc9 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 19 Oct 2011 09:11:08 +0200 Subject: [PATCH] Add listing support for xz --- patoolib/programs/xz.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patoolib/programs/xz.py b/patoolib/programs/xz.py index ed01282..3e161dc 100644 --- a/patoolib/programs/xz.py +++ b/patoolib/programs/xz.py @@ -21,3 +21,12 @@ from patoolib.programs import extract_singlefile_standard, \ extract_xz = extract_singlefile_standard test_xz = test_singlefile_standard create_xz = create_singlefile_standard + +def list_xz (archive, encoding, cmd, **kwargs): + """List a XZ archive.""" + cmdlist = [cmd] + cmdlist.append('-l') + if kwargs['verbose']: + cmdlist.append('-v') + cmdlist.append(archive) + return cmdlist