bundles / IPython 9.3.0 / IPython / core / profiledir / ProfileDir / _mkdir
function
IPython.core.profiledir:ProfileDir._mkdir
source: /IPython/core/profiledir.py :74
Signature
def _mkdir ( self , path : str , mode : Optional[int] = None ) → bool Summary
ensure a directory exists at a given path
Extended Summary
This is a version of os.mkdir, with the following differences:
returns whether the directory has been created or not.
ignores EEXIST, protecting against race conditions where the dir may have been created in between the check and the creation
sets permissions if requested and the dir already exists
Parameters
path: strpath of the dir to create
mode: intsee
modeof os.mkdir
Returns
: bool:returns True if it created the directory, False otherwise
Aliases
-
IPython.core.application.ProfileDir._mkdir