Make a file called targetpath.
(self, tarinfo, targetpath)
| 2651 | raise |
| 2652 | |
| 2653 | def makefile(self, tarinfo, targetpath): |
| 2654 | """Make a file called targetpath. |
| 2655 | """ |
| 2656 | source = self.fileobj |
| 2657 | source.seek(tarinfo.offset_data) |
| 2658 | bufsize = self.copybufsize |
| 2659 | with bltn_open(targetpath, "wb") as target: |
| 2660 | if tarinfo.sparse is not None: |
| 2661 | for offset, size in tarinfo.sparse: |
| 2662 | target.seek(offset) |
| 2663 | copyfileobj(source, target, size, ReadError, bufsize) |
| 2664 | target.seek(tarinfo.size) |
| 2665 | target.truncate() |
| 2666 | else: |
| 2667 | copyfileobj(source, target, tarinfo.size, ReadError, bufsize) |
| 2668 | |
| 2669 | def makeunknown(self, tarinfo, targetpath): |
| 2670 | """Make a file from a TarInfo object with an unknown type |
no test coverage detected