PyDocs

Nav

Data Compression and Archiving

TarInfo

tarfile

class (source)
  • TarInfo(name='')
Informational class which holds the details about an
archive member given by a tar header block.
TarInfo objects are returned by TarFile.getmember(),
TarFile.getmembers() and TarFile.gettarinfo() and are
usually created internally.
Members of TarInfo

c

chksum
Header checksum.

d

devmajor
Device major number.
devminor
Device minor number.

f

frombuf
Construct a TarInfo object from a 512 byte bytes object.
fromtarfile
Return the next TarInfo object from TarFile object tarfile.

g

gid
Group ID of the user who originally stored this member.
gname
Group name.

i

isblk
Return True if it is a block device.
ischr
Return True if it is a character device.
isdev
Return True if it is one of character device, block device or FIFO.
isdir
Return True if it is a directory.
isfifo
Return True if it is a FIFO.
isfile
Return True if the Tarinfo object is a regular file.
islnk
Return True if it is a hard link.
isreg
Return True if the Tarinfo object is a regular file.
issym
Return True if it is a symbolic link.

l

linkname
Name of the target file name, which is only present in TarInfo objects of type LNKTYPE and SYMTYPE.

m

mode
Permission bits, as for os.chmod().
mtime
Time of last modification in seconds since the epoch, as in os.stat_result.st_mtime.

n

name
Name of the archive member.

o

offset
The tar header starts here.
offset_data
The file’s data starts here.

p

pax_headers
A dictionary containing key-value pairs of an associated pax extended header.

r

replace
Return a deep copy of self with the given attributes replaced.

s

size
Size in bytes.
sparse
Sparse member information.

t

tobuf
Return a tar header as a string of 512 byte blocks.
type
File type.

u

uid
User ID of the user who originally stored this member.
uname
User name.
0 Examples
No examples for tarfile/TarInfo.
See Also
No see-alsos for tarfile/TarInfo
0 Notes
No notes for TarInfo