quemb.shared.manage_scratch.WorkDir.make_subdir

WorkDir.make_subdir(name, ensure_empty=False)

Create a subdirectory with the same cleanup settings as self.

If the subdirectory already exists, it is also fine. In this case you can use the ensure_empty argument to delete existing files.

Parameters:
  • name (str | PathLike) – The name of the subdirectory. Its path will be self.path / name.

  • ensure_empty (bool) – If the directory already exists, ensure that it is empty and delete files.

Return type:

Self