kicad-mcp/mckicad/utils/temp_dir_manager.py
Ryan Malloy 687e14bd11 Rename project from kicad-mcp to mckicad
Rename source directory kicad_mcp/ → mckicad/, update all imports,
pyproject.toml metadata, documentation references, Makefile targets,
and .gitignore paths. All 195 tests pass.
2026-02-13 00:53:59 -07:00

27 lines
542 B
Python

"""
Utility for managing temporary directories.
"""
# List of temporary directories to clean up
_temp_dirs: list[str] = []
def register_temp_dir(temp_dir: str) -> None:
"""Register a temporary directory for cleanup.
Args:
temp_dir: Path to the temporary directory
"""
if temp_dir not in _temp_dirs:
_temp_dirs.append(temp_dir)
def get_temp_dirs() -> list[str]:
"""Get all registered temporary directories.
Returns:
List of temporary directory paths
"""
return _temp_dirs.copy()