|
__init__(self,
name=None,
mode=' r ' ,
fileobj=None)
Open an (uncompressed) tar archive `name'. |
|
|
|
close(self)
Close the TarFile. |
|
|
|
getmember(self,
name)
Return a TarInfo object for member `name'. |
|
|
|
getmembers(self)
Return the members of the archive as a list of TarInfo objects. |
|
|
|
getnames(self)
Return the members of the archive as a list of their names. |
|
|
|
gettarinfo(self,
name=None,
arcname=None,
fileobj=None)
Create a TarInfo object for either the file `name' or the file object
`fileobj' (using os.fstat on its file descriptor). |
|
|
|
list(self,
verbose=True)
Print a table of contents to sys.stdout. |
|
|
|
add(self,
name,
arcname=None,
recursive=True)
Add the file `name' to the archive. |
|
|
|
addfile(self,
tarinfo,
fileobj=None)
Add the TarInfo object `tarinfo' to the archive. |
|
|
|
extractall(self,
path=' . ' ,
members=None)
Extract all members from the archive to the current working directory
and set owner, modification time and permissions on directories
afterwards. |
|
|
|
extract(self,
member,
path='
' )
Extract a member from the archive to the current working directory,
using its full name. |
|
|
|
extractfile(self,
member)
Extract a member from the archive as a file object. |
|
|
|
_extract_member(self,
tarinfo,
targetpath)
Extract the TarInfo object tarinfo to a physical file called
targetpath. |
|
|
|
makedir(self,
tarinfo,
targetpath)
Make a directory called targetpath. |
|
|
|
makefile(self,
tarinfo,
targetpath)
Make a file called targetpath. |
|
|
|
makeunknown(self,
tarinfo,
targetpath)
Make a file from a TarInfo object with an unknown type at targetpath. |
|
|
|
makefifo(self,
tarinfo,
targetpath)
Make a fifo called targetpath. |
|
|
|
makedev(self,
tarinfo,
targetpath)
Make a character or block device called targetpath. |
|
|
|
makelink(self,
tarinfo,
targetpath)
Make a (symbolic) link called targetpath. |
|
|
|
chown(self,
tarinfo,
targetpath)
Set owner of targetpath according to tarinfo. |
|
|
|
chmod(self,
tarinfo,
targetpath)
Set file permissions of targetpath according to tarinfo. |
|
|
|
utime(self,
tarinfo,
targetpath)
Set modification time of targetpath according to tarinfo. |
|
|
|
next(self)
Return the next member of the archive as a TarInfo object, when
TarFile is opened for reading. |
|
|
|
proc_member(self,
tarinfo)
Choose the right processing method for tarinfo depending on its type
and call it. |
|
|
|
proc_builtin(self,
tarinfo)
Process a builtin type member or an unknown member which will be
treated as a regular file. |
|
|
|
proc_gnulong(self,
tarinfo)
Process the blocks that hold a GNU longname or longlink member. |
|
|
|
proc_sparse(self,
tarinfo)
Process a GNU sparse header plus extra headers. |
|
|
|
_block(self,
count)
Round up a byte count by BLOCKSIZE and return it, e.g. |
|
|
|
_getmember(self,
name,
tarinfo=None)
Find an archive member by name from bottom to top. |
|
|
|
_load(self)
Read through the entire archive file and look for readable members. |
|
|
|
_check(self,
mode=None)
Check if TarFile is still open, and if the operation's mode
corresponds to TarFile's mode. |
|
|
|
__iter__(self)
Provide an iterator object. |
|
|
|
_dbg(self,
level,
msg)
Write debugging output to sys.stderr. |
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|