Lines Matching refs:targetpath
2171 def _extract_member(self, tarinfo, targetpath): argument
2178 targetpath = targetpath.rstrip("/")
2179 targetpath = targetpath.replace("/", os.sep)
2182 upperdirs = os.path.dirname(targetpath)
2194 self.makefile(tarinfo, targetpath)
2196 self.makedir(tarinfo, targetpath)
2198 self.makefifo(tarinfo, targetpath)
2200 self.makedev(tarinfo, targetpath)
2202 self.makelink(tarinfo, targetpath)
2204 self.makeunknown(tarinfo, targetpath)
2206 self.makefile(tarinfo, targetpath)
2208 self.chown(tarinfo, targetpath)
2210 self.chmod(tarinfo, targetpath)
2211 self.utime(tarinfo, targetpath)
2218 def makedir(self, tarinfo, targetpath): argument
2224 os.mkdir(targetpath, 0700)
2229 def makefile(self, tarinfo, targetpath): argument
2234 with bltn_open(targetpath, "wb") as target:
2239 def makeunknown(self, tarinfo, targetpath): argument
2243 self.makefile(tarinfo, targetpath)
2247 def makefifo(self, tarinfo, targetpath): argument
2251 os.mkfifo(targetpath)
2255 def makedev(self, tarinfo, targetpath): argument
2267 os.mknod(targetpath, mode,
2270 def makelink(self, tarinfo, targetpath): argument
2278 if os.path.lexists(targetpath):
2279 os.unlink(targetpath)
2280 os.symlink(tarinfo.linkname, targetpath)
2284 if os.path.lexists(targetpath):
2285 os.unlink(targetpath)
2286 os.link(tarinfo._link_target, targetpath)
2288 self._extract_member(self._find_link_target(tarinfo), targetpath)
2291 self._extract_member(self._find_link_target(tarinfo), targetpath)
2295 def chown(self, tarinfo, targetpath): argument
2310 os.lchown(targetpath, u, g)
2313 os.chown(targetpath, u, g)
2317 def chmod(self, tarinfo, targetpath): argument
2322 os.chmod(targetpath, tarinfo.mode)
2326 def utime(self, tarinfo, targetpath): argument
2332 os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))