This is a development version (latest) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython latest / IPython / utils / path / ensure_dir_exists

function

IPython.utils.path:ensure_dir_exists

source: /IPython/utils/path.py:345

Signature

def ensure_dir_exists(path: str, mode: int = 493)

Summary

ensure that a directory exists

Extended Summary

If it doesn't exist, try to create it and protect against a race condition if another process is doing the same.

The default permissions are 755, which differ from os.makedirs default of 777.

Aliases

  • IPython.paths.ensure_dir_exists