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

Function _ensure_directory

Lib/shutil.py:1306–1310  ·  view source on GitHub ↗

Ensure that the parent directory of `path` exists

(path)

Source from the content-addressed store, hash-verified

1304 del _UNPACK_FORMATS[name]
1305
1306def _ensure_directory(path):
1307 """Ensure that the parent directory of `path` exists"""
1308 dirname = os.path.dirname(path)
1309 if not os.path.isdir(dirname):
1310 os.makedirs(dirname)
1311
1312def _unpack_zipfile(filename, extract_dir):
1313 """Unpack zip `filename` to `extract_dir`

Callers 1

_unpack_zipfileFunction · 0.85

Calls 2

dirnameMethod · 0.45
isdirMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…