Make a file called targetpath.
(self, tarinfo, targetpath)
| 2670 | raise |
| 2671 | |
| 2672 | def makefile(self, tarinfo, targetpath): |
| 2673 | """Make a file called targetpath. |
| 2674 | """ |
| 2675 | source = self.fileobj |
| 2676 | source.seek(tarinfo.offset_data) |
| 2677 | bufsize = self.copybufsize |
| 2678 | with bltn_open(targetpath, "wb") as target: |
| 2679 | if tarinfo.sparse is not None: |
| 2680 | for offset, size in tarinfo.sparse: |
| 2681 | target.seek(offset) |
| 2682 | copyfileobj(source, target, size, ReadError, bufsize) |
| 2683 | target.seek(tarinfo.size) |
| 2684 | target.truncate() |
| 2685 | else: |
| 2686 | copyfileobj(source, target, tarinfo.size, ReadError, bufsize) |
| 2687 | |
| 2688 | def makeunknown(self, tarinfo, targetpath): |
| 2689 | """Make a file from a TarInfo object with an unknown type |
no test coverage detected