|
12345678910111213141516171819 |
- import os
- from pathlib import Path
-
- import config as cfg
-
-
- def app_root_dir(pvd: str) -> str:
- basedir = Path(os.path.abspath(os.path.dirname(__file__)))
- return os.path.join(basedir.parent, cfg.DIR_APP_ROOT, pvd)
-
-
- def resource_dir(pvd: str) -> str:
- basedir = Path(os.path.abspath(os.path.dirname(__file__)))
- return os.path.join(basedir.parent, cfg.DIR_RESOURCE, pvd)
-
-
- def template_dir() -> str:
- basedir = Path(os.path.abspath(os.path.dirname(__file__)))
- return os.path.join(basedir.parent, cfg.DIR_TEMPLATE)
|