neuralib.util.utils.ensure_dir

neuralib.util.utils.ensure_dir(p, verbose=True)[source]

Ensure the path is a directory. Create if it is not exist.

Parameters:
  • p (str | Path | PathLike[str]) – path to be checked

  • verbose (bool) – print verbose message

Return type:

Path