directoryUtil.py 307 B

123456789101112
  1. import os
  2. class DirectoryUtil:
  3. @staticmethod
  4. def check_directory_exists(path: str) -> bool:
  5. """检查目录是否存在"""
  6. return os.path.exists(path)
  7. @staticmethod
  8. def create_directory(path: str) -> None:
  9. """创建目录"""
  10. os.makedirs(path, exist_ok=True)