MCPcopy Index your code
hub / github.com/RustPython/RustPython / makedir

Method makedir

Lib/tarfile.py:2638–2651  ·  view source on GitHub ↗

Make a directory called targetpath.

(self, tarinfo, targetpath)

Source from the content-addressed store, hash-verified

2636 # subclass to implement other functionality.
2637
2638 def makedir(self, tarinfo, targetpath):
2639 """Make a directory called targetpath.
2640 """
2641 try:
2642 if tarinfo.mode is None:
2643 # Use the system's default mode
2644 os.mkdir(targetpath)
2645 else:
2646 # Use a safe mode for the directory, the real mode is set
2647 # later in _extract_member().
2648 os.mkdir(targetpath, 0o700)
2649 except FileExistsError:
2650 if not os.path.isdir(targetpath):
2651 raise
2652
2653 def makefile(self, tarinfo, targetpath):
2654 """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