def makefile(self, tarinfo, targetpath):
source = self.fileobj<EOL>source.seek(tarinfo.offset_data)<EOL>target = bltn_open(targetpath, "<STR_LIT:wb>")<EOL>if tarinfo.sparse is not None:<EOL><INDENT>for offset, size in tarinfo.sparse:<EOL><INDENT>target.seek(offset)<EOL>copyfileobj(source, target, size)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>copyfileobj(source, target, tarinfo.size)<EOL><DEDENT>target.seek(tarinfo.size)<EOL>target.truncate()<EOL>target.close()<EOL>
Make a file called targetpath.