Lines Matching full:targetpath
2137 def _extract_member(self, tarinfo, targetpath):
2139 file called targetpath.
2144 targetpath = targetpath.rstrip("/")
2145 targetpath = targetpath.replace("/", os.sep)
2148 upperdirs = os.path.dirname(targetpath)
2160 self.makefile(tarinfo, targetpath)
2162 self.makedir(tarinfo, targetpath)
2164 self.makefifo(tarinfo, targetpath)
2166 self.makedev(tarinfo, targetpath)
2168 self.makelink(tarinfo, targetpath)
2170 self.makeunknown(tarinfo, targetpath)
2172 self.makefile(tarinfo, targetpath)
2174 self.chown(tarinfo, targetpath)
2176 self.chmod(tarinfo, targetpath)
2177 self.utime(tarinfo, targetpath)
2184 def makedir(self, tarinfo, targetpath):
2185 """Make a directory called targetpath.
2190 os.mkdir(targetpath, 0700)
2195 def makefile(self, tarinfo, targetpath):
2196 """Make a file called targetpath.
2200 with bltn_open(targetpath, "wb") as target:
2205 def makeunknown(self, tarinfo, targetpath):
2207 at targetpath.
2209 self.makefile(tarinfo, targetpath)
2213 def makefifo(self, tarinfo, targetpath):
2214 """Make a fifo called targetpath.
2217 os.mkfifo(targetpath)
2221 def makedev(self, tarinfo, targetpath):
2222 """Make a character or block device called targetpath.
2233 os.mknod(targetpath, mode,
2236 def makelink(self, tarinfo, targetpath):
2237 """Make a (symbolic) link called targetpath. If it cannot be created
2244 if os.path.lexists(targetpath):
2245 os.unlink(targetpath)
2246 os.symlink(tarinfo.linkname, targetpath)
2250 if os.path.lexists(targetpath):
2251 os.unlink(targetpath)
2252 os.link(tarinfo._link_target, targetpath)
2254 self._extract_member(self._find_link_target(tarinfo), targetpath)
2257 self._extract_member(self._find_link_target(tarinfo), targetpath)
2261 def chown(self, tarinfo, targetpath):
2262 """Set owner of targetpath according to tarinfo.
2276 os.lchown(targetpath, u, g)
2279 os.chown(targetpath, u, g)
2283 def chmod(self, tarinfo, targetpath):
2284 """Set file permissions of targetpath according to tarinfo.
2288 os.chmod(targetpath, tarinfo.mode)
2292 def utime(self, tarinfo, targetpath):
2293 """Set modification time of targetpath according to tarinfo.
2298 os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))