Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-89159: Add some TarFile attribute types #114520

Merged
merged 5 commits into from
Jan 29, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/library/tarfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ be finalized; only the internally used file object will be closed. See the


.. attribute:: TarFile.pax_headers
:type: dict

A dictionary containing key-value pairs of pax global headers.

Expand Down Expand Up @@ -773,6 +774,7 @@ A ``TarInfo`` object has the following public data attributes:
attribute.

.. attribute:: TarInfo.type
:type: bytes
encukou marked this conversation as resolved.
Show resolved Hide resolved

File type. *type* is usually one of these constants: :const:`REGTYPE`,
:const:`AREGTYPE`, :const:`LNKTYPE`, :const:`SYMTYPE`, :const:`DIRTYPE`,
Expand Down Expand Up @@ -838,31 +840,37 @@ A ``TarInfo`` object has the following public data attributes:
attribute.

.. attribute:: TarInfo.chksum
:type: int

Header checksum.


.. attribute:: TarInfo.devmajor
:type: int

Device major number.


.. attribute:: TarInfo.devminor
:type: int

Device minor number.


.. attribute:: TarInfo.offset
:type: int

The tar header starts here.


.. attribute:: TarInfo.offset_data
:type: int

The file's data starts here.


.. attribute:: TarInfo.sparse
:type: Optional[list]
encukou marked this conversation as resolved.
Show resolved Hide resolved

Sparse member information.

Expand Down
Loading