On this page
  1. tarfile.TarInfo
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

tarfile.TarInfo

Prev: tarfile.TarFile | Up: tarfile
Rel: tarfile.AbsoluteLinkError, tarfile.AbsolutePathError, tarfile.CompressionError, tarfile.data_filter
Ref: docs.python.org — tarfile.TarInfo
Tags: #public #python3 #stdlib #tarfile


Import

import tarfile
from tarfile import TarInfo

Signature & Overview

tarfile.TarInfo(name='')

Informational class which holds the details about an archive member given by a tar header block.

Methods & Attributes

Usage

import tarfile

info = tarfile.TarInfo("docs/readme.txt")
info.size = 12
info.mode = 0o644
assert info.isfile() and info.name == "docs/readme.txt"

Gotchas

REPL Inspect

from tarfile import TarInfo
help(TarInfo)

Linked from

Related notes