Return the object as a ustar header block.
(self, info, encoding, errors)
| 1049 | raise ValueError("invalid format") |
| 1050 | |
| 1051 | def create_ustar_header(self, info, encoding, errors): |
| 1052 | """Return the object as a ustar header block. |
| 1053 | """ |
| 1054 | info["magic"] = POSIX_MAGIC |
| 1055 | |
| 1056 | if len(info["linkname"].encode(encoding, errors)) > LENGTH_LINK: |
| 1057 | raise ValueError("linkname is too long") |
| 1058 | |
| 1059 | if len(info["name"].encode(encoding, errors)) > LENGTH_NAME: |
| 1060 | info["prefix"], info["name"] = self._posix_split_name(info["name"], encoding, errors) |
| 1061 | |
| 1062 | return self._create_header(info, USTAR_FORMAT, encoding, errors) |
| 1063 | |
| 1064 | def create_gnu_header(self, info, encoding, errors): |
| 1065 | """Return the object as a GNU header block sequence. |
no test coverage detected