Ensure the directory exists, create if it doesn't
(dir_path)
| 6 | class FileSystemManager: |
| 7 | @staticmethod |
| 8 | def ensure_dir(dir_path): |
| 9 | """Ensure the directory exists, create if it doesn't""" |
| 10 | path = Path(dir_path) |
| 11 | if not path.exists(): |
| 12 | path.mkdir(parents=True, exist_ok=True) |
| 13 | return path |
| 14 | |
| 15 | @staticmethod |
| 16 | def ensure_file(file_path, default_content=""): |
no outgoing calls
no test coverage detected