summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2007-06-18 11:42:11 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2007-06-18 11:42:11 (GMT)
commit104490e6159e2b541cf51c17399453906f59f825 (patch)
tree4c16ba783779df699c598d5008ec71ed348cb6ec /Doc
parent9d0476f7da7be1a03a5b5d8e48d072b83be2f31d (diff)
downloadcpython-104490e6159e2b541cf51c17399453906f59f825.zip
cpython-104490e6159e2b541cf51c17399453906f59f825.tar.gz
cpython-104490e6159e2b541cf51c17399453906f59f825.tar.bz2
Added exclude keyword argument to the TarFile.add() method.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libtarfile.tex9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/lib/libtarfile.tex b/Doc/lib/libtarfile.tex
index 54683a7..67207a1 100644
--- a/Doc/lib/libtarfile.tex
+++ b/Doc/lib/libtarfile.tex
@@ -314,13 +314,16 @@ tar archive several times. Each archive member is represented by a
\end{notice}
\end{methoddesc}
-\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive}}}
+\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive\optional{, exclude}}}}
Add the file \var{name} to the archive. \var{name} may be any type
of file (directory, fifo, symbolic link, etc.).
If given, \var{arcname} specifies an alternative name for the file in the
archive. Directories are added recursively by default.
- This can be avoided by setting \var{recursive} to \constant{False};
- the default is \constant{True}.
+ This can be avoided by setting \var{recursive} to \constant{False}.
+ If \var{exclude} is given it must be a function that takes one filename
+ argument and returns a boolean value. Depending on this value the
+ respective file is either excluded (\constant{True}) or added
+ (\constant{False}).
\end{methoddesc}
\begin{methoddesc}{addfile}{tarinfo\optional{, fileobj}}