MCPcopy Index your code
hub / github.com/python/cpython / makedir

Method makedir

Lib/tarfile.py:2657–2670  ·  view source on GitHub ↗

Make a directory called targetpath.

(self, tarinfo, targetpath)

Source from the content-addressed store, hash-verified

2655 # subclass to implement other functionality.
2656
2657 def makedir(self, tarinfo, targetpath):
2658 """Make a directory called targetpath.
2659 """
2660 try:
2661 if tarinfo.mode is None:
2662 # Use the system's default mode
2663 os.mkdir(targetpath)
2664 else:
2665 # Use a safe mode for the directory, the real mode is set
2666 # later in _extract_member().
2667 os.mkdir(targetpath, 0o700)
2668 except FileExistsError:
2669 if not os.path.isdir(targetpath):
2670 raise
2671
2672 def makefile(self, tarinfo, targetpath):
2673 """Make a file called targetpath.

Callers 1

_extract_memberMethod · 0.95

Calls 2

mkdirMethod · 0.45
isdirMethod · 0.45

Tested by

no test coverage detected