import os import shutil from pathlib import Path INPUT_BROWSER_LIMIT = 380 CURRENT_DIR = Path(__file__).parent DEPLOYMENT_DIR = CURRENT_DIR / "deployment_files" KEYS_DIR = DEPLOYMENT_DIR / ".fhe_keys" CLIENT_DIR = DEPLOYMENT_DIR / "client_dir" SERVER_DIR = DEPLOYMENT_DIR / "server_dir" ALL_DIRS = [KEYS_DIR, CLIENT_DIR, SERVER_DIR] def clean_directory() -> None: """ Clear direcgtories """ print("Cleaning...\n") for target_dir in ALL_DIRS: if os.path.exists(target_dir) and os.path.isdir(target_dir): shutil.rmtree(target_dir) target_dir.mkdir(exist_ok=True, parents=True)