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

Function _ensure_directory

Lib/shutil.py:1303–1307  ·  view source on GitHub ↗

Ensure that the parent directory of `path` exists

(path)

Source from the content-addressed store, hash-verified

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

Callers 1

_unpack_zipfileFunction · 0.85

Calls 1

isdirMethod · 0.45

Tested by

no test coverage detected