+
+ def to_directory(self, parent_dir: str) -> None:
+ parent_path = os.path.join(parent_dir, self.type)
+ path = os.path.join(parent_path, self.name)
+ if not os.path.exists(parent_path):
+ os.makedirs(parent_path, exist_ok=True)
+ if not os.path.exists(path):
+ os.mkdir(path)