Return the object as a GNU header block sequence.
(self, info, encoding, errors)
| 1009 | return self._create_header(info, USTAR_FORMAT, encoding, errors) |
| 1010 | |
| 1011 | def create_gnu_header(self, info, encoding, errors): |
| 1012 | """Return the object as a GNU header block sequence. |
| 1013 | """ |
| 1014 | info["magic"] = GNU_MAGIC |
| 1015 | |
| 1016 | buf = b"" |
| 1017 | if len(info["linkname"].encode(encoding, errors)) > LENGTH_LINK: |
| 1018 | buf += self._create_gnu_long_header(info["linkname"], GNUTYPE_LONGLINK, encoding, errors) |
| 1019 | |
| 1020 | if len(info["name"].encode(encoding, errors)) > LENGTH_NAME: |
| 1021 | buf += self._create_gnu_long_header(info["name"], GNUTYPE_LONGNAME, encoding, errors) |
| 1022 | |
| 1023 | return buf + self._create_header(info, GNU_FORMAT, encoding, errors) |
| 1024 | |
| 1025 | def create_pax_header(self, info, encoding): |
| 1026 | """Return the object as a ustar header block. If it cannot be |
no test coverage detected