You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
683 B

  1. import os
  2. from pathlib import Path
  3. import config as cfg
  4. def app_root_dir(pvd: str) -> str:
  5. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  6. return os.path.join(basedir.parent, cfg.DIR_APP_ROOT, pvd)
  7. def doc_root_dir() -> str:
  8. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  9. return os.path.join(basedir.parent, cfg.DIR_DOC_ROOT)
  10. def resource_dir(pvd: str) -> str:
  11. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  12. return os.path.join(basedir.parent, cfg.DIR_RESOURCE, pvd)
  13. def template_dir() -> str:
  14. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  15. return os.path.join(basedir.parent, cfg.DIR_TEMPLATE)