MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / makedir

Method makedir

tools/python-3.11.9-amd64/Lib/tarfile.py:2436–2449  ·  view source on GitHub ↗

Make a directory called targetpath.

(self, tarinfo, targetpath)

Source from the content-addressed store, hash-verified

2434 # subclass to implement other functionality.
2435
2436 def makedir(self, tarinfo, targetpath):
2437 """Make a directory called targetpath.
2438 """
2439 try:
2440 if tarinfo.mode is None:
2441 # Use the system's default mode
2442 os.mkdir(targetpath)
2443 else:
2444 # Use a safe mode for the directory, the real mode is set
2445 # later in _extract_member().
2446 os.mkdir(targetpath, 0o700)
2447 except FileExistsError:
2448 if not os.path.isdir(targetpath):
2449 raise
2450
2451 def makefile(self, tarinfo, targetpath):
2452 """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