Initial certificate system
This commit is contained in:
15
backend/app/core/paths.py
Normal file
15
backend/app/core/paths.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from pathlib import Path
|
||||
|
||||
from app.core.config import settings
|
||||
|
||||
DATA_ROOT = Path(settings.data_root)
|
||||
|
||||
|
||||
def ensure_data_dirs() -> None:
|
||||
for name in ["uploads", "error-reports", "exports", "pdf-cache"]:
|
||||
(DATA_ROOT / name).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
def data_path(name: str) -> Path:
|
||||
ensure_data_dirs()
|
||||
return DATA_ROOT / name
|
||||
Reference in New Issue
Block a user