17 lines
433 B
Python
17 lines
433 B
Python
from pathlib import Path
|
|
|
|
|
|
APP_DIR = Path(__file__).resolve().parents[2]
|
|
BACKEND_DIR = APP_DIR / "backend"
|
|
FRONTEND_DIR = APP_DIR / "frontend"
|
|
STATIC_DIR = APP_DIR / "static"
|
|
DATA_DIR = APP_DIR / "data"
|
|
LOG_DIR = APP_DIR / "logs"
|
|
SCRIPTS_DIR = APP_DIR / "scripts"
|
|
DB_PATH = DATA_DIR / "app.db"
|
|
|
|
|
|
def ensure_dirs() -> None:
|
|
for path in (STATIC_DIR, DATA_DIR, LOG_DIR, SCRIPTS_DIR):
|
|
path.mkdir(parents=True, exist_ok=True)
|