]> granicus.if.org Git - python/commit
Issue #6856: Add a filter keyword argument to TarFile.add().
authorLars Gustäbel <lars@gustaebel.de>
Sat, 12 Sep 2009 10:28:15 +0000 (10:28 +0000)
committerLars Gustäbel <lars@gustaebel.de>
Sat, 12 Sep 2009 10:28:15 +0000 (10:28 +0000)
commit21121e64b4245e51b85b9d2bc9b29acb86ae79eb
tree8ffeaf69afab8ef548aea364b49b6c86476f80ab
parentd4c7eb16475f6ca662120aeda4518051f031c0d8
Issue #6856: Add a filter keyword argument to TarFile.add().

The filter argument must be a function that takes a TarInfo
object argument, changes it and returns it again. If the
function returns None the TarInfo object will be excluded
from the archive.
The exclude argument is deprecated from now on, because it
does something similar but is not as flexible.
Doc/library/tarfile.rst
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS