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

bundles / IPython 9.14.0.dev / IPython / utils / path / ensure_dir_exists

function

IPython.utils.path:ensure_dir_exists

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

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