5.1.1.11. mkdir_p_or_die

mfutil.mkdir_p_or_die(path, nodebug=False, exit_code=2)[source]

Make a directory recursively (clone of mkdir -p).

If the directory already exists, True is returned with no debug or warning.

Any exceptions are catched.

In case of problems, the program dies here with corresponding exit_code.

Parameters:
  • path (string) – complete path to create.
  • nodebug (boolean) – if True, no debug messages are logged.
  • exit_code (int) – os._exit() exit code.