cratepy.ioput.fileoperations.remove_dirs

remove_dirs(target_dir, required_dirnames)[source]

Remove unrequired directories and files in target directory.

Parameters:
  • target_dir (str) – Path of target directory.

  • required_dirnames (list[str]) – Paths that are to be preserved in target directory.